Skip to content

Commit 5f447c1

Browse files
josephperrottmmalerba
authored andcommitted
release: remove .npmrc file at end of release (#17685)
1 parent dcd0707 commit 5f447c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/release/publish-release.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import chalk from 'chalk';
22
import {spawnSync} from 'child_process';
33
import {readFileSync, unlinkSync} from 'fs';
4+
import {homedir} from 'os';
45
import {join} from 'path';
56
import {BaseReleaseTask} from './base-release-task';
67
import {checkReleaseOutput} from './check-release-output';
@@ -132,7 +133,7 @@ class PublishReleaseTask extends BaseReleaseTask {
132133
console.info(chalk.yellow(` ${newReleaseUrl}`));
133134

134135
// Remove file at ~/.npmrc after release is complete.
135-
unlinkSync('~/.npmrc');
136+
unlinkSync(`${homedir()}/.npmrc`);
136137
}
137138

138139
/**

0 commit comments

Comments
 (0)