Skip to content

Commit

Permalink
Edit error copy
Browse files Browse the repository at this point in the history
  • Loading branch information
kemmerle committed Sep 11, 2024
1 parent df4d24b commit e0d2ed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/cli/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ exports.handler = async options => {

const doesOtherConfigFileExist = configFileExists(!useHiddenConfig);
if (doesOtherConfigFileExist) {
logger.error(i18n(`${i18nKey}.errors.bothConfigFilesNotAllowed`));
const path =
(c && path.join(getCwd(), c)) || getConfigPath('', !useHiddenConfig);
logger.error(i18n(`${i18nKey}.errors.bothConfigFilesNotAllowed`, { path }));
process.exit(EXIT_CODES.ERROR);
}
if (c && useHiddenConfig) {
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/lang/en.lyaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ en:
describe: "Configure authentication for a HubSpot account. Supported authentication protocols are {{ supportedProtocols }}."
errors:
noConfigFileFound: "No config file was found. To create a new config file, use the \"hs init\" command."
bothConfigFilesNotAllowed: "Two config files are not allowed. Please delete one if necessary and try again."
unsupportedAuthType: "Unsupported auth type: {{ type }}. The only supported authentication protocols are {{ supportedProtocols }}."
positionals:
type:
Expand Down Expand Up @@ -425,7 +424,7 @@ en:
useNewConfig: "Would you like to use the new version of the HubSpot config file? It will be located in the root directory"
errors:
configFileExists: "The config file {{ configPath }} already exists."
bothConfigFilesNotAllowed: "Two config files are not allowed. Please delete one if necessary and try again."
bothConfigFilesNotAllowed: "Unable to create config file, because there is an existing one at \"{{ path }}\". To create a new config file, delete the existing one and try again."
noSpecifiedPathWithHiddenConfig: "It's not possible to specify a config path when creating a config file hidden in the user's working directory"
lint:
issuesFound: "{{ count }} issues found."
Expand Down

0 comments on commit e0d2ed4

Please sign in to comment.