Skip to content

concore build exits 0 without building when the output directory already exists; no way to rebuild #717

Backlog

Description

@yadavchiragg

If the --output directory already exists, concore build prints a yellow warning ("Remove it first or choose a different output directory") and returns, so the exit code is 0 and nothing is built. Scripts and CI that do concore build ... && ./run then run a stale study. concore init already exits non-zero when its target exists.

Also, rebuilding after editing a workflow (the most common loop) requires deleting the folder by hand.

Proposal:

  1. Exit with an error (exit code 1) when the output directory exists, mentioning --force.
  2. Add concore build --force, which replaces the output directory only if it looks like a study generated by concore (has a build and a run script). It refuses anything else, and never deletes the current directory, the home directory, or a directory containing the workflow or the sources (so a concore init project folder is safe).

I have a fix with tests ready.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions