Skip to content

Commit

Permalink
select version in heta-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Dec 17, 2023
1 parent 4deb132 commit 1210950
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/heta-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ const { name, version } = require('../package.json');

program
.name('heta update')
.description('Update heta-compiler to the latest version.')
.description('Update heta-compiler to the latest version, or selected version if argument is set.')
.usage('[version]')
.parse(process.argv);

exec(`npm install --global ${name}`, (err, stdout, stderr) => {
let forceVersion = program.args[0] || 'latest';

exec(`npm install --global ${name}@${forceVersion}`, (err, stdout, stderr) => {
if (stderr) {
process.stdout.write(stderr);
process.exit(1); // BRAKE
Expand Down

0 comments on commit 1210950

Please sign in to comment.