Skip to content

Commit

Permalink
feat(cli): -v short alias for --version
Browse files Browse the repository at this point in the history
  • Loading branch information
imhoffd committed Apr 6, 2020
1 parent 6ba568c commit 6a3adec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/help.ts
Expand Up @@ -40,7 +40,7 @@ const help = `
--android-project <path> ............. Use specified directory for Android native project (default: 'android')
-h, --help ........................... Print help for the platform, then quit
--version ............................ Print version, then quit
-v, --version ........................ Print version, then quit
--verbose ............................ Print verbose output to stderr
`;

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -187,7 +187,7 @@ namespace CordovaRes {
}

export async function runCommandLine(args: readonly string[]): Promise<void> {
if (args.includes('--version')) {
if (args.includes('--version') || args.includes('-v')) {
const pkg = await import(path.resolve(__dirname, '../package.json'));
process.stdout.write(pkg.version + '\n');
return;
Expand Down

0 comments on commit 6a3adec

Please sign in to comment.