Skip to content

Commit

Permalink
Reordered options
Browse files Browse the repository at this point in the history
  • Loading branch information
tlaanemaa committed Apr 29, 2019
1 parent 2d53c59 commit ddbf2c9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/modules/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ const { version, name } = require('../../package.json');

const commandArgs = {};

// Main shared options
program
.name(name)
.version(version, '-v, --version')
.description('A simple command line tool to backup and restore docker container inspection results and their volumes.\nRead more at: https://www.npmjs.com/package/backup-docker')
.option('-d, --directory [directory]', 'directory name to save to or look for container backups', process.cwd())
.option('-s, --socket-path [socket-path]', 'docker socket path')
.option('--only-containers', 'backup/restore containers only')
.option('--only-volumes', 'backup/restore volumes only. If used with the restore command then the container is expected to already exist');

// Backup command
program
.command('backup [containers...]')
Expand All @@ -21,16 +31,6 @@ program
commandArgs.containers = containers;
});

// Main shared options
program
.name(name)
.version(version, '-v, --version')
.description('A simple command line tool to backup and restore docker container inspection results and their volumes.\nRead more at: https://www.npmjs.com/package/backup-docker')
.option('-d, --directory [directory]', 'directory name to save to or look for container backups', process.cwd())
.option('-s, --socket-path [socket-path]', 'docker socket path')
.option('--only-containers', 'backup/restore containers only')
.option('--only-volumes', 'backup/restore volumes only. If used with the restore command then the container is expected to already exist');

// Unknown command handler
program
.command('*', { noHelp: true })
Expand Down

0 comments on commit ddbf2c9

Please sign in to comment.