@@ -20,6 +20,8 @@ import {
2020 ENV ,
2121 LOOP_SENTINEL ,
2222 NPM_REGISTRY_URL ,
23+ SOCKET_CLI_ISSUES_URL ,
24+ UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE ,
2325 rootPath
2426} from '../constants'
2527import { ColorOrMarkdown } from '../utils/color-or-markdown'
@@ -155,8 +157,7 @@ type RequireTransformer<T extends keyof KnownModules> = (
155157 mod : KnownModules [ T ]
156158) => KnownModules [ T ]
157159
158- const POTENTIALLY_BUG_ERROR_SNIPPET =
159- 'this is potentially a bug with socket-npm caused by changes to the npm cli'
160+ const POTENTIAL_BUG_ERROR_MESSAGE = `This is may be a bug with socket-npm related to changes to the npm CLI.\nPlease report to ${ SOCKET_CLI_ISSUES_URL } .`
160161
161162const npmEntrypoint = realpathSync ( process . argv [ 1 ] ! )
162163const npmRootPath = findRoot ( path . dirname ( npmEntrypoint ) )
@@ -188,9 +189,8 @@ function tryRequire<T extends keyof KnownModules>(
188189
189190if ( npmRootPath === undefined ) {
190191 console . error (
191- `Unable to find npm cli install directory, ${ POTENTIALLY_BUG_ERROR_SNIPPET } . `
192+ `Unable to find npm CLI install directory.\nSearched parent directories of ${ npmEntrypoint } .\n\n ${ POTENTIAL_BUG_ERROR_MESSAGE } `
192193 )
193- console . error ( `Searched parent directories of ${ npmEntrypoint } ` )
194194 process . exit ( 127 )
195195}
196196
@@ -218,7 +218,7 @@ const log = tryRequire(
218218
219219if ( log === undefined ) {
220220 console . error (
221- `Unable to integrate with npm cli logging infrastructure, ${ POTENTIALLY_BUG_ERROR_SNIPPET } .`
221+ `Unable to integrate with npm CLI logging infrastructure.\n\n ${ POTENTIAL_BUG_ERROR_MESSAGE } .`
222222 )
223223 process . exit ( 127 )
224224}
@@ -1299,7 +1299,7 @@ export class SafeArborist extends Arborist {
12991299 if ( diff . findIndex ( c => c . repository_url === NPM_REGISTRY_URL ) === - 1 ) {
13001300 return await this [ kRiskyReify ] ( ...args )
13011301 }
1302- let proceed = ENV . UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE
1302+ let proceed = ENV [ UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE ]
13031303 if ( ! proceed ) {
13041304 proceed = await ttyServer . captureTTY ( async ( input , output ) => {
13051305 if ( input && output ) {
0 commit comments