File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ import type Config from "../../config.js";
1414import { MessageError } from "../../errors.js" ;
1515import * as fs from "../../util/fs.js" ;
1616
17- let path = require ( "path" ) ;
18-
1917export function setFlags ( commander : Object ) {
2018 commander . usage ( "cache [clear | ls]" ) ;
2119}
@@ -39,7 +37,7 @@ export async function run(
3937 throw new MessageError ( "TODO" ) ;
4038 }
4139
42- if ( cmd === "clear" ) {
40+ if ( cmd === "clear" && config . packagesRoot ) {
4341 await fs . unlink ( config . packagesRoot ) ;
4442 reporter . success ( `Cleared ${ config . packagesRoot } ` ) ;
4543 }
Original file line number Diff line number Diff line change 1313import * as constants from "../constants.js" ;
1414import BlockingQueue from "./blocking-queue.js" ;
1515import { promisify } from "./promise.js" ;
16+ import { MessageError } from "../errors.js" ;
1617
1718let child = require ( "child_process" ) ;
1819
You can’t perform that action at this time.
0 commit comments