File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as fs from 'fs-extra' ;
22import * as spec from 'jsii-spec' ;
3+ import * as os from 'os' ;
34import * as path from 'path' ;
45import { SourceMapConsumer } from 'source-map' ;
56import * as tar from 'tar' ;
@@ -73,7 +74,7 @@ export class Kernel {
7374 }
7475
7576 if ( ! this . installDir ) {
76- this . installDir = await fs . mkdtemp ( '/tmp/ jsii-kernel-') ;
77+ this . installDir = await fs . mkdtemp ( path . join ( os . tmpdir ( ) , ' jsii-kernel-') ) ;
7778 await fs . mkdirp ( path . join ( this . installDir , 'node_modules' ) ) ;
7879 this . _debug ( 'creating jsii-kernel modules workdir:' , this . installDir ) ;
7980
@@ -110,7 +111,7 @@ export class Kernel {
110111 } else {
111112 // untar the archive to a staging directory, read the jsii spec from it
112113 // 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-') ) ;
114115 try {
115116 await tar . extract ( { strict : true , file : req . tarball , cwd : staging } ) ;
116117
You can’t perform that action at this time.
0 commit comments