Skip to content

Commit 1255803

Browse files
refactor(installer): use single regexp to make repo path safe
1 parent 2445495 commit 1255803

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/electron-forge-install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const main = async () => {
111111
}
112112

113113
const tmpdir = path.resolve(os.tmpdir(), 'forge-install');
114-
const pathSafeRepo = repo.replace(/\//g, '-').replace(/\\/g, '-');
114+
const pathSafeRepo = repo.replace(/[/\\]/g, '-');
115115
const filename = `${pathSafeRepo}-${latestRelease.tag_name}-${targetAsset.name}`;
116116

117117
const fullFilePath = path.resolve(tmpdir, filename);

0 commit comments

Comments
 (0)