Merge pull request #2980 from ppascher/allow_workspace_missing_output

Update workspace.c
master
Drew DeVault 6 years ago committed by GitHub
commit 37eb83940f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,10 +38,6 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
if ((error = checkarg(argc, "workspace", EXPECTED_AT_LEAST, 1))) { if ((error = checkarg(argc, "workspace", EXPECTED_AT_LEAST, 1))) {
return error; return error;
} }
if (!root->outputs->length) {
return cmd_results_new(CMD_INVALID, "workspace",
"Can't run this command while there's no outputs connected.");
}
int output_location = -1; int output_location = -1;
int gaps_location = -1; int gaps_location = -1;
@ -112,6 +108,9 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
} else { } else {
if (config->reading || !config->active) { if (config->reading || !config->active) {
return cmd_results_new(CMD_DEFER, "workspace", NULL); return cmd_results_new(CMD_DEFER, "workspace", NULL);
} else if (!root->outputs->length) {
return cmd_results_new(CMD_INVALID, "workspace",
"Can't run this command while there's no outputs connected.");
} }
bool no_auto_back_and_forth = false; bool no_auto_back_and_forth = false;

Loading…
Cancel
Save