|
@@ -13,6 +13,7 @@ const tauri = function (command) {
|
|
|
if (typeof command === 'object') { // technically we just care about an array
|
|
|
command = command[0]
|
|
|
}
|
|
|
+
|
|
|
if (!command || command === '-h' || command === '--help' || command === 'help') {
|
|
|
console.log(`
|
|
|
Description
|
|
@@ -21,11 +22,18 @@ const tauri = function (command) {
|
|
|
$ tauri ${cmds.join('|')}
|
|
|
Options
|
|
|
--help, -h Displays this message
|
|
|
+ --version, -v Displays the Tauri CLI version
|
|
|
`)
|
|
|
process.exit(0)
|
|
|
// eslint-disable-next-line no-unreachable
|
|
|
- return false// do this for node consumers and tests
|
|
|
+ return false // do this for node consumers and tests
|
|
|
+ }
|
|
|
+
|
|
|
+ if (command === '-v' || command === '--version') {
|
|
|
+ console.log(require('../package.json').version)
|
|
|
+ return false // do this for node consumers and tests
|
|
|
}
|
|
|
+
|
|
|
if (cmds.includes(command)) {
|
|
|
if (process.argv && !process.env.test) {
|
|
|
process.argv.splice(2, 1)
|