Skip to content

Commit

Permalink
Handle undefined import.meta.url
Browse files Browse the repository at this point in the history
  • Loading branch information
sebamarynissen committed Nov 12, 2024
1 parent 2ea66da commit dd3ebe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import defaultBrowser from 'default-browser';
import isInsideContainer from 'is-inside-container';

// Path to included `xdg-open`.
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const __dirname = path.dirname(fileURLToPath(import.meta.url || process.execPath));
const localXdgOpenPath = path.join(__dirname, 'xdg-open');

const {platform, arch} = process;
Expand Down

0 comments on commit dd3ebe8

Please sign in to comment.