Skip to content

Commit

Permalink
sync on check unless --workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanatkn committed Sep 29, 2023
1 parent 1ca5c76 commit 11e822e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/wild-oranges-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@grogarden/gro': patch
---

sync on `check` unless `--workspace`
5 changes: 5 additions & 0 deletions src/lib/check.task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export const task: Task<Args> = {
run: async ({args, invoke_task}) => {
const {typecheck, test, gen, format, exports, lint, workspace} = args;

const sync = !workspace; // if checking the workspace, don't sync! would lead to misleading errors
if (sync) {
await invoke_task('sync');
}

if (typecheck) {
await invoke_task('typecheck');
}
Expand Down

0 comments on commit 11e822e

Please sign in to comment.