Skip to content

Commit 4add9fa

Browse files
committed
Must resolve path to the cli module
1 parent b72c777 commit 4add9fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ts2famix-cli-wrapper.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
#!/usr/bin/env node
22

33
import { spawn } from 'child_process';
4+
import * as path from 'path';
45

5-
// allow tslog to display the proper typescript files and line numbers
6+
// Resolve the path to ts2famix-cli.js relative to the wrapper script
7+
const cliPath = path.resolve(__dirname, 'ts2famix-cli.js');
8+
9+
// Allow tslog to display the proper TypeScript files and line numbers
610
const args = [
711
'--enable-source-maps',
812
'--experimental-specifier-resolution=node',
9-
'dist/ts2famix-cli.js',
13+
cliPath,
1014
...process.argv.slice(2)
1115
];
1216

0 commit comments

Comments
 (0)