Skip to content

Commit

Permalink
SummonWorkspaceCommand: better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitabobko committed Oct 13, 2024
1 parent d914e20 commit e3936aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/AppBundle/command/impl/SummonWorkspaceCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ struct SummonWorkspaceCommand: Command {
io.err("Workspace '\(workspace.name)' is already visible on the focused monitor. Tip: use --fail-if-noop to exit with non-zero code")
return !args.failIfNoop
}
return monitor.setActiveWorkspace(workspace) && workspace.focusWorkspace()
if monitor.setActiveWorkspace(workspace) {
return workspace.focusWorkspace()
} else {
return io.err("Can't move workspace '\(workspace.name)' to monitor '\(monitor.name)'. workspace-to-monitor-force-assignment doesn't allow it")
}
}
}

0 comments on commit e3936aa

Please sign in to comment.