This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 redownload-electron-bins.js: Correct path
Construct the atomRepoPath variable starting with __dirname, so that atomRepoPath is an absolute path. For example: '/Users/[username]/atom/package.json', versus '../../../../atom/package.json'. --- Explanation for why this is necessary: The require() and fs.existsSync() functions interpret relative paths differently. require() is relative to the current script's containing folder, (which is the same as __dirname), whereas 'fs.existsSync()' is relative to the working directory (which is the same as process.cwd()). When constructing the path to the Atom repo's main package.json, we should construct it as an absolute path, for consistency's sake. Otherwise the script will error out, or use the wrong package.json.
- Loading branch information
@thedaniel #2799