File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import * as fs from 'fs-extra' ;
2
2
import * as spec from 'jsii-spec' ;
3
+ import * as os from 'os' ;
3
4
import * as path from 'path' ;
4
5
import { SourceMapConsumer } from 'source-map' ;
5
6
import * as tar from 'tar' ;
@@ -73,7 +74,7 @@ export class Kernel {
73
74
}
74
75
75
76
if ( ! this . installDir ) {
76
- this . installDir = await fs . mkdtemp ( '/tmp/ jsii-kernel-') ;
77
+ this . installDir = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , ' jsii-kernel-') ) ;
77
78
await fs . mkdirp ( path . join ( this . installDir , 'node_modules' ) ) ;
78
79
this . _debug ( 'creating jsii-kernel modules workdir:' , this . installDir ) ;
79
80
@@ -110,7 +111,7 @@ export class Kernel {
110
111
} else {
111
112
// untar the archive to a staging directory, read the jsii spec from it
112
113
// and then move it to the node_modules directory of the kernel.
113
- const staging = await fs . mkdtemp ( '/tmp/ jsii-kernel-install-staging-') ;
114
+ const staging = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , ' jsii-kernel-install-staging-') ) ;
114
115
try {
115
116
await tar . extract ( { strict : true , file : req . tarball , cwd : staging } ) ;
116
117
You can’t perform that action at this time.
0 commit comments