Skip to content

Commit 8ce0f7d

Browse files
committed
Fix handling of import.meta.url not being available
Fixes #324
1 parent 2283000 commit 8ce0f7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import isInsideContainer from 'is-inside-container';
1313
const execFile = promisify(childProcess.execFile);
1414

1515
// Path to included `xdg-open`.
16-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
16+
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : '';
1717
const localXdgOpenPath = path.join(__dirname, 'xdg-open');
1818

1919
const {platform, arch} = process;

0 commit comments

Comments
 (0)