Skip to content

Commit

Permalink
#225 renamed to --global
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Feb 14, 2024
1 parent c8f56eb commit a1703bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = function(opts) {
const home = path.resolve(opts.target);
fs.rmSync(home, {recursive: true, force: true});
console.info('The directory %s deleted', rel(home));
if (opts.cached) {
if (opts.global) {
const eo = path.join(os.homedir(), '.eo');
if (fs.existsSync(eo)) {
fs.rmSync(eo, {recursive: true});
Expand Down
2 changes: 1 addition & 1 deletion src/eoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ program.command('foreign')

program
.command('clean')
.option('--cached', 'delete ~/.eo directory')
.option('--global', 'delete ~/.eo directory')
.description('Delete all temporary files')
.action((str, opts) => {
clean({...program.opts(), ...str});
Expand Down
2 changes: 1 addition & 1 deletion test/commands/test_clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('clean', function() {
fs.mkdirSync(eo, {recursive: true});
fs.writeFileSync(path.resolve(home, 'src/clean.eo'), '[] > clean\n');
const stdout = runSync([
'clean', '-s', path.resolve(home, 'src'), '-t', path.resolve(home, 'target'), '--cached',
'clean', '-s', path.resolve(home, 'src'), '-t', path.resolve(home, 'target'), '--global',
]);
assert(!fs.existsSync(path.resolve(home, 'target')), stdout);
assert(!fs.existsSync(eo), stdout);
Expand Down

0 comments on commit a1703bd

Please sign in to comment.