build: fix relative file read during npm publish (#44092)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
trop[bot] 2024-10-01 17:19:29 -07:00 committed by GitHub
parent 98b1d305b6
commit 653b928e0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,7 @@ import { getAssetContents } from '../get-asset';
import { createGitHubTokenStrategy } from '../github-token'; import { createGitHubTokenStrategy } from '../github-token';
import { ELECTRON_ORG, ELECTRON_REPO, ElectronReleaseRepo, NIGHTLY_REPO } from '../types'; import { ELECTRON_ORG, ELECTRON_REPO, ElectronReleaseRepo, NIGHTLY_REPO } from '../types';
const rootPackageJson = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../../package.json'), 'utf-8')); const rootPackageJson = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../../../package.json'), 'utf-8'));
if (!process.env.ELECTRON_NPM_OTP) { if (!process.env.ELECTRON_NPM_OTP) {
console.error('Please set ELECTRON_NPM_OTP'); console.error('Please set ELECTRON_NPM_OTP');