File tree Expand file tree Collapse file tree
packages/cli/src/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { handleConfigAuto } from './handle-config-auto.mts'
22import { FLAG_JSON , FLAG_MARKDOWN } from '../../constants/cli.mts'
3+ import { HOME } from '../../env/home.mts'
34import { outputDryRunWrite } from '../../utils/dry-run/output.mts'
45import { defineFlags } from '../../meow.mts'
56import { commonFlags , outputFlags } from '../../flags.mts'
@@ -101,7 +102,7 @@ ${getSupportedConfigEntries()
101102 }
102103
103104 if ( dryRun ) {
104- const configPath = `${ process . env [ ' HOME' ] } /.config/socket/config.json`
105+ const configPath = `${ HOME } /.config/socket/config.json`
105106 outputDryRunWrite (
106107 configPath ,
107108 `auto-discover and set config value for "${ key } "` ,
Original file line number Diff line number Diff line change 11import { FLAG_JSON , FLAG_MARKDOWN } from '../../constants/cli.mjs'
2+ import { HOME } from '../../env/home.mts'
23import { outputDryRunWrite } from '../../utils/dry-run/output.mts'
34import { commonFlags , outputFlags } from '../../flags.mts'
45import { meowOrExit } from '../../utils/cli/with-subcommands.mjs'
@@ -130,7 +131,7 @@ ${spec.helpExamples.map(ex => ` $ ${command} ${ex}`).join('\n')}
130131 }
131132
132133 if ( dryRun ) {
133- const configPath = `${ process . env [ ' HOME' ] } /.config/socket/config.json`
134+ const configPath = `${ HOME } /.config/socket/config.json`
134135 const changes = spec . needsValue
135136 ? [ `Set "${ key } " to: ${ value } ` ]
136137 : [ `Remove "${ key } " from config` ]
Original file line number Diff line number Diff line change 11import { handleInstallCompletion } from './handle-install-completion.mts'
2+ import { HOME } from '../../env/home.mts'
23import { outputDryRunWrite } from '../../utils/dry-run/output.mts'
34import { defineFlags } from '../../meow.mts'
45import { commonFlags } from '../../flags.mts'
@@ -67,7 +68,7 @@ async function run(
6768 const targetName = cli . input [ 0 ] || 'socket'
6869
6970 if ( dryRun ) {
70- const bashRcPath = `${ process . env [ ' HOME' ] } /.bashrc`
71+ const bashRcPath = `${ HOME } /.bashrc`
7172 outputDryRunWrite (
7273 bashRcPath ,
7374 `install bash completion for "${ targetName } "` ,
Original file line number Diff line number Diff line change 11import isInteractive from '@socketregistry/is-interactive/index.cjs'
22
33import { attemptLogin } from './attempt-login.mts'
4+ import { HOME } from '../../env/home.mts'
45import { outputDryRunWrite } from '../../utils/dry-run/output.mts'
56import { defineFlags } from '../../meow.mts'
67import { commonFlags } from '../../flags.mts'
@@ -82,7 +83,7 @@ async function run(
8283 const dryRun = ! ! cli . flags [ 'dryRun' ]
8384
8485 if ( dryRun ) {
85- const configPath = `${ process . env [ ' HOME' ] } /.config/socket/config.json`
86+ const configPath = `${ HOME } /.config/socket/config.json`
8687 const changes = [
8788 'Prompt for Socket API token' ,
8889 'Verify token with Socket API' ,
Original file line number Diff line number Diff line change 11import { getDefaultLogger } from '@socketsecurity/lib/logger'
22
3+ import { HOME } from '../../env/home.mts'
34import { outputDryRunDelete } from '../../utils/dry-run/output.mts'
45import {
56 CONFIG_KEY_API_BASE_URL ,
@@ -84,7 +85,7 @@ export async function run(
8485 const dryRun = ! ! cli . flags [ 'dryRun' ]
8586
8687 if ( dryRun ) {
87- const configPath = `${ process . env [ ' HOME' ] } /.config/socket/config.json`
88+ const configPath = `${ HOME } /.config/socket/config.json`
8889 outputDryRunDelete ( 'Socket API credentials' , configPath )
8990 return
9091 }
You can’t perform that action at this time.
0 commit comments