diff --git a/packages/insomnia-inso/src/cli.ts b/packages/insomnia-inso/src/cli.ts index 3e3f0d85f1..4b695a59f9 100644 --- a/packages/insomnia-inso/src/cli.ts +++ b/packages/insomnia-inso/src/cli.ts @@ -562,7 +562,14 @@ export const go = (args?: string[]) => { env => matchIdIsh(env, options.globals) || env.name === options.globals, ); if (!globalEnv) { - logger.warn('No global environment found with id or name', options.globals); + logger.warn( + `Error: No global environment found with ID or name "${options.globals}". + TIP: If you're running "inso" inside a Git project, specify the path to the Insomnia YAML file containing the global environment using the "--globals" option. + + Example: + $ inso run collection --globals /path/to/global-environment.yaml + `, + ); return process.exit(1); } if (globalEnv) { @@ -897,11 +904,10 @@ export const go = (args?: string[]) => { program.parseAsync(scriptArgs).catch(logErrorAndExit); }); - program.command('generate-docs') - .action(() => { - generateDocumentation(program); - return process.exit(1); - }); + program.command('generate-docs').action(() => { + generateDocumentation(program); + return process.exit(1); + }); program.parseAsync(args || process.argv).catch(logErrorAndExit); }; diff --git a/packages/insomnia-inso/src/db/index.ts b/packages/insomnia-inso/src/db/index.ts index 0ecb38fa64..a3be793415 100644 --- a/packages/insomnia-inso/src/db/index.ts +++ b/packages/insomnia-inso/src/db/index.ts @@ -90,9 +90,23 @@ export const loadDb = async ({ pathToSearch, filterTypes }: Options) => { } logger.warn( - `No git, app data store or Insomnia V4 export file found at path "${pathToSearch}", - --workingDir/-w should point to a git repository root, an Insomnia export file or a directory containing Insomnia data. - re-run with --verbose to see tracing information`, + `Error: No data source found at path "${pathToSearch}". + TIP: Use "--workingDir/-w" to specify one of the following: + - A Git repository root + - An Insomnia export file + - A directory containing Insomnia data + + Examples: + 1. Using a (legacy) Git repository: + $ inso run collection --workingDir /path/to/git-repo + + 2. Using an Insomnia export file or inside a Git project: + $ inso run collection --workingDir /path/to/insomnia-file.yaml + + 3. Using a directory with Insomnia app data: + $ inso run collection --workingDir /path/to/insomnia-data + + Re-run with "--verbose" for more details.`, ); return emptyDb();