@leverege/build-tools 2.90.0 → 2.90.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node --trace-deprecation
|
|
2
2
|
/*
|
|
3
3
|
* refresh-npm-token will check the access time of the $HOME/.npmrc npm token
|
|
4
4
|
* file and if it is older than 24 hours then it will be updated to whatever
|
|
@@ -228,11 +228,12 @@ try {
|
|
|
228
228
|
if ( args.dryRun ) {
|
|
229
229
|
log( chalk.yellow( '\n*** Dry Run - files will not be updated' ) )
|
|
230
230
|
} else {
|
|
231
|
+
const { filename } = npmrc
|
|
231
232
|
log( chalk.yellow( '\n*** Refreshing your ~/.npmrc npm token file' ) )
|
|
232
|
-
if ( fs.existsSync(
|
|
233
|
-
fs.copyFileSync(
|
|
233
|
+
if ( fs.existsSync( filename ) ) {
|
|
234
|
+
fs.copyFileSync( filename, `${filename}-BAK` ) // make a backup for safety
|
|
234
235
|
}
|
|
235
|
-
fs.writeFileSync(
|
|
236
|
+
fs.writeFileSync( filename, npmrcFile )
|
|
236
237
|
}
|
|
237
238
|
} catch ( fileErr ) {
|
|
238
239
|
log( fileErr, 'fs failed' )
|