Skip to content

Commit

Permalink
Improve readability of error messages (#50)
Browse files Browse the repository at this point in the history
* Add '--argument' flag for `dfx deploy`

* Set up defaults for deployArgs

* Implement deploy args

* 0.10.1

* Change error messages to use light red terminal color

* 0.10.2

* 0.11.1
  • Loading branch information
rvanasa authored Jul 12, 2023
1 parent 6ca688b commit 71653a1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mo-dev",
"version": "0.11.0",
"version": "0.11.1",
"description": "A live reload development server for Motoko smart contracts.",
"author": "DFINITY Foundation (https://dfinity.org)",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export async function runTests(
console.error(run.stdout);
}
if (run.stderr?.trim()) {
console.error(pc.red(run.stderr));
console.error(pc.bold(pc.red(run.stderr)));
}
}
const showTestMode =
Expand Down
20 changes: 12 additions & 8 deletions src/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,12 @@ export async function watch(settings: Settings) {
return true;
} catch (err) {
console.error(
pc.red(
`Error while updating canister '${canister.alias}':\n${
err.message || err
}`,
pc.bold(
pc.red(
`Error while updating canister '${canister.alias}':\n${
err.message || err
}`,
),
),
);
return false;
Expand All @@ -481,10 +483,12 @@ export async function watch(settings: Settings) {
}
} catch (err) {
console.error(
pc.red(
`Error while removing canister '${canister.alias}':\n${
err.message || err
}`,
pc.bold(
pc.red(
`Error while removing canister '${canister.alias}':\n${
err.message || err
}`,
),
),
);
}
Expand Down

0 comments on commit 71653a1

Please sign in to comment.