This repository was archived by the owner on Jul 6, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
const BB = require ( 'bluebird' )
4
4
5
- const fs = BB . promisifyAll ( require ( 'fs' ) )
5
+ const statAsync = BB . promisify ( require ( 'fs' ) . stat )
6
6
const path = require ( 'path' )
7
7
8
8
module . exports = getPrefix
@@ -44,7 +44,7 @@ function getPrefix (current, root) {
44
44
}
45
45
46
46
function fileExists ( f ) {
47
- return fs . statAsync ( f ) . catch ( { code : 'ENOENT' } , ( ) => false )
47
+ return statAsync ( f ) . catch ( { code : 'ENOENT' } , ( ) => false )
48
48
}
49
49
50
50
function isRootPath ( p ) {
Original file line number Diff line number Diff line change 3
3
4
4
const BB = require ( 'bluebird' )
5
5
6
- const autoFallback = require ( './auto-fallback.js' )
7
6
const child = require ( './child' )
8
7
const getPrefix = require ( './get-prefix.js' )
9
8
const parseArgs = require ( './parse-args.js' )
@@ -22,7 +21,9 @@ module.exports = main
22
21
function main ( argv ) {
23
22
const shell = argv [ 'shell-auto-fallback' ]
24
23
if ( shell || shell === '' ) {
25
- const fallback = autoFallback ( shell , process . env . SHELL , argv )
24
+ const fallback = require ( './auto-fallback.js' ) (
25
+ shell , process . env . SHELL , argv
26
+ )
26
27
if ( fallback ) {
27
28
console . log ( fallback )
28
29
process . exit ( 0 )
You can’t perform that action at this time.
0 commit comments