File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,15 @@ export function isPlatformMac(
9393 return platform === 'darwin' || platform === 'mas' ;
9494}
9595
96+ /**
97+ * Gets the tmpdir for packaging. Note that if `opts.tmpdir` is false,
98+ * we're still returning a path.
99+ */
96100export function baseTempDir ( opts : Options ) {
97- return path . join ( opts . tmpdir || os . tmpdir ( ) , 'electron-packager' ) ;
101+ return path . join (
102+ typeof opts . tmpdir === 'string' ? opts . tmpdir : os . tmpdir ( ) ,
103+ 'electron-packager' ,
104+ ) ;
98105}
99106
100107/**
Original file line number Diff line number Diff line change @@ -581,9 +581,11 @@ export interface Options {
581581 quiet ?: boolean ;
582582 /**
583583 * The base directory to use as a temporary directory. Set to `false` to disable use of a
584- * temporary directory. Defaults to the system's temporary directory.
584+ * temporary directory.
585+ *
586+ * @defaultValue Uses the system's temporary directory if `true` or `undefined`.
585587 */
586- tmpdir ?: string | false ;
588+ tmpdir ?: string | boolean ;
587589 /**
588590 * Human-readable descriptions of how the Electron app uses certain macOS features. These are displayed
589591 * in the App Store. A non-exhaustive list of available properties:
You can’t perform that action at this time.
0 commit comments