File tree Expand file tree Collapse file tree
rush-plugins/rush-bridge-cache-plugin/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import type {
1414 RushSession
1515} from '@rushstack/rush-sdk' ;
1616import { CommandLineParameterKind } from '@rushstack/ts-command-line' ;
17- import type { CommandLineFlagParameter , CommandLineParameter } from '@rushstack/ts-command-line' ;
17+ import type { CommandLineParameter } from '@rushstack/ts-command-line' ;
1818
1919const PLUGIN_NAME : 'RushBridgeCachePlugin' = 'RushBridgeCachePlugin' ;
2020
@@ -225,6 +225,14 @@ export class BridgeCachePlugin implements IRushPlugin {
225225 this . _requireOutputFoldersParameterName
226226 ) ;
227227
228- return ! ! ( requireOutputFoldersParam && ( requireOutputFoldersParam as CommandLineFlagParameter ) . value ) ;
228+ if ( ! requireOutputFoldersParam ) {
229+ return false ;
230+ }
231+
232+ if ( requireOutputFoldersParam . kind !== CommandLineParameterKind . Flag ) {
233+ throw new Error ( `The parameter "${ this . _requireOutputFoldersParameterName } " must be a flag.` ) ;
234+ }
235+
236+ return requireOutputFoldersParam . value ;
229237 }
230238}
You can’t perform that action at this time.
0 commit comments