File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import { getConfigFileName, readFilesFromTsconfig } from "./utils";
15
15
16
16
const packageJson = JSON . parse ( fs . readFileSync ( path . join ( __dirname , "../package.json" ) ) . toString ( ) ) ;
17
17
18
+ const resolvePath = ( filePath : string ) => path . isAbsolute ( filePath ) ? filePath : path . join ( process . cwd ( ) , filePath ) ;
19
+
18
20
interface RootOptions {
19
21
replace : boolean ;
20
22
verify : boolean ;
@@ -64,10 +66,10 @@ let root = commandpost
64
66
let editorconfig = ! ! opts . editorconfig ;
65
67
let vscode = ! ! opts . vscode ;
66
68
let tsfmt = ! ! opts . tsfmt ;
67
- let tsconfigFile = opts . useTsconfig [ 0 ] ? path . join ( process . cwd ( ) , opts . useTsconfig [ 0 ] ) : null ;
68
- let tslintFile = opts . useTslint [ 0 ] ? path . join ( process . cwd ( ) , opts . useTslint [ 0 ] ) : null ;
69
- let vscodeFile = opts . useVscode [ 0 ] ? path . join ( process . cwd ( ) , opts . useVscode [ 0 ] ) : null ;
70
- let tsfmtFile = opts . useTsfmt [ 0 ] ? path . join ( process . cwd ( ) , opts . useTsfmt [ 0 ] ) : null ;
69
+ let tsconfigFile = opts . useTsconfig [ 0 ] ? resolvePath ( opts . useTsconfig [ 0 ] ) : null ;
70
+ let tslintFile = opts . useTslint [ 0 ] ? resolvePath ( opts . useTslint [ 0 ] ) : null ;
71
+ let vscodeFile = opts . useVscode [ 0 ] ? resolvePath ( opts . useVscode [ 0 ] ) : null ;
72
+ let tsfmtFile = opts . useTsfmt [ 0 ] ? resolvePath ( opts . useTsfmt [ 0 ] ) : null ;
71
73
let verbose = ! ! opts . verbose ;
72
74
let version = ! ! opts . version ;
73
75
You can’t perform that action at this time.
0 commit comments