Skip to content

Commit

Permalink
Fix --version flag
Browse files Browse the repository at this point in the history
The recent PR pulsar-edit#100 made me want to check this command and I noticed
I messed up at two places to make this work.
Rather obvious fixes for a fortunate catch...
  • Loading branch information
Polgár Márton committed Oct 1, 2023
1 parent 98ee850 commit c16feb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/apm-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ async function printVersions(args) {
const npmVersion = require("npm/package.json").version ?? "";
const nodeVersion = process.versions.node ?? "";

const pythonVersion = await getPythonVersion();
const gitVersion = await git.getGitVersion();
const atomVersion = await getAtomVersion();
let pythonVersion = await getPythonVersion();
let gitVersion = await git.getGitVersion();
let atomVersion = await getAtomVersion();
let versions;
if (args.json) {
versions = {
Expand Down
4 changes: 2 additions & 2 deletions src/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ exports.getGitVersion = () => {
userconfig: config.getUserConfigPath(),
globalconfig: config.getGlobalConfigPath()
};
return new Promise((resolve, _reject => {
return new Promise((resolve, _reject) => {
npm.load(npmOptions, () => {
const git = npm.config.get('git') ?? 'git';
exports.addGitToEnv(process.env);
Expand All @@ -85,5 +85,5 @@ exports.getGitVersion = () => {
resolve(version);
});
});
}));
});
};

0 comments on commit c16feb5

Please sign in to comment.