Skip to content

Commit 6a3adec

Browse files
committed
feat(cli): -v short alias for --version
1 parent 6ba568c commit 6a3adec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/help.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const help = `
4040
--android-project <path> ............. Use specified directory for Android native project (default: 'android')
4141
4242
-h, --help ........................... Print help for the platform, then quit
43-
--version ............................ Print version, then quit
43+
-v, --version ........................ Print version, then quit
4444
--verbose ............................ Print verbose output to stderr
4545
`;
4646

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ namespace CordovaRes {
187187
}
188188

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

0 commit comments

Comments
 (0)