Skip to content

Commit

Permalink
chore: improved error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jaccomeijer committed Aug 5, 2021
1 parent 0fa9788 commit dca4b16
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/commands/link-command/link-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ export const linkCommand = async ({ monoRepoPath }: LinkCommand) => {
const { rootNode, fsChildren } = await getFromArborist({ path: monoRepoPath })
if (!rootNode) {
console.log(
`An error occured getting nodes` + monoRepoPath
? `from path ${monoRepoPath}`
: ''
`An error occured getting nodes from ` +
(monoRepoPath ? `${monoRepoPath}` : 'current folder')
)
return
}
Expand Down
5 changes: 2 additions & 3 deletions src/commands/list-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ export const listCommand = async ({ monoRepoPath }: ListCommand) => {

if (!rootNode) {
console.log(
`An error occured getting nodes` + monoRepoPath
? `from path ${monoRepoPath}`
: ''
`An error occured getting nodes from ` +
(monoRepoPath ? `${monoRepoPath}` : 'current folder')
)
return
}
Expand Down
5 changes: 2 additions & 3 deletions src/commands/sync-command/sync-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ export const syncCommand = async ({ monoRepoPath }: SyncCommand) => {
const { rootNode, fsChildren } = await getFromArborist({ path: monoRepoPath })
if (!rootNode) {
console.log(
`An error occured getting nodes` + monoRepoPath
? `from path ${monoRepoPath}`
: ''
`An error occured getting nodes from ` +
(monoRepoPath ? `${monoRepoPath}` : 'current folder')
)
return
}
Expand Down

0 comments on commit dca4b16

Please sign in to comment.