diff --git a/src/commands/scan/cmd-scan-create.ts b/src/commands/scan/cmd-scan-create.ts index bf74f3f3a..6afac5d88 100644 --- a/src/commands/scan/cmd-scan-create.ts +++ b/src/commands/scan/cmd-scan-create.ts @@ -235,11 +235,14 @@ async function run( const wasBadInput = handleBadInput( { - nook: true, - test: orgSlug, + nook: !!defaultOrgSlug, + test: orgSlug && orgSlug !== '.', message: 'Org name as the first argument', pass: 'ok', - fail: 'missing' + fail: + orgSlug === '.' + ? 'dot is an invalid org, most likely you forgot the org name here?' + : 'missing' }, { test: targets.length, diff --git a/src/commands/scan/cmd-scan-del.ts b/src/commands/scan/cmd-scan-del.ts index ee91adb95..085e18177 100644 --- a/src/commands/scan/cmd-scan-del.ts +++ b/src/commands/scan/cmd-scan-del.ts @@ -62,11 +62,14 @@ async function run( const wasBadInput = handleBadInput( { - nook: true, - test: orgSlug, + nook: !!defaultOrgSlug, + test: orgSlug && orgSlug !== '.', message: 'Org name as the first argument', pass: 'ok', - fail: 'missing' + fail: + orgSlug === '.' + ? 'dot is an invalid org, most likely you forgot the org name here?' + : 'missing' }, { test: scanId, diff --git a/src/commands/scan/cmd-scan-list.ts b/src/commands/scan/cmd-scan-list.ts index 2f35c643f..46196c78d 100644 --- a/src/commands/scan/cmd-scan-list.ts +++ b/src/commands/scan/cmd-scan-list.ts @@ -102,11 +102,14 @@ async function run( const wasBadInput = handleBadInput( { - nook: true, - test: orgSlug, + nook: !!defaultOrgSlug, + test: orgSlug && orgSlug !== '.', message: 'Org name as the first argument', pass: 'ok', - fail: 'missing' + fail: + orgSlug === '.' + ? 'dot is an invalid org, most likely you forgot the org name here?' + : 'missing' }, { nook: true, diff --git a/src/commands/scan/cmd-scan-metadata.ts b/src/commands/scan/cmd-scan-metadata.ts index 6a291d458..0b0a853f5 100644 --- a/src/commands/scan/cmd-scan-metadata.ts +++ b/src/commands/scan/cmd-scan-metadata.ts @@ -66,11 +66,14 @@ async function run( const wasBadInput = handleBadInput( { - nook: true, - test: orgSlug, + nook: !!defaultOrgSlug, + test: orgSlug && orgSlug !== '.', message: 'Org name as the first argument', pass: 'ok', - fail: 'missing' + fail: + orgSlug === '.' + ? 'dot is an invalid org, most likely you forgot the org name here?' + : 'missing' }, { test: scanId, diff --git a/src/commands/scan/cmd-scan-report.ts b/src/commands/scan/cmd-scan-report.ts index 35d01a592..a2f200127 100644 --- a/src/commands/scan/cmd-scan-report.ts +++ b/src/commands/scan/cmd-scan-report.ts @@ -105,11 +105,14 @@ async function run( const wasBadInput = handleBadInput( { - nook: true, - test: orgSlug, + nook: !!defaultOrgSlug, + test: orgSlug && orgSlug !== '.', message: 'Org name as the first argument', pass: 'ok', - fail: 'missing' + fail: + orgSlug === '.' + ? 'dot is an invalid org, most likely you forgot the org name here?' + : 'missing' }, { test: scanId, diff --git a/src/commands/scan/cmd-scan-view.ts b/src/commands/scan/cmd-scan-view.ts index d1b4c9dc8..4123a6225 100644 --- a/src/commands/scan/cmd-scan-view.ts +++ b/src/commands/scan/cmd-scan-view.ts @@ -70,11 +70,14 @@ async function run( const wasBadInput = handleBadInput( { - nook: true, - test: orgSlug, + nook: !!defaultOrgSlug, + test: orgSlug && orgSlug !== '.', message: 'Org name as the first argument', pass: 'ok', - fail: 'missing' + fail: + orgSlug === '.' + ? 'dot is an invalid org, most likely you forgot the org name here?' + : 'missing' }, { test: scanId,