diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2018-12-19 17:48:08 +0000 |
---|---|---|
committer | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2018-12-20 13:59:23 +0000 |
commit | 46efc91dc3c37324903e62648dd1f0dc3b661af1 (patch) | |
tree | 2b83c60b36bc5c545a5e01d0b8f3b69568cbcbc0 /buildstream/_context.py | |
parent | 7368f569e1fcb0dc8b765e43c811ac314ca5bfbd (diff) | |
download | buildstream-46efc91dc3c37324903e62648dd1f0dc3b661af1.tar.gz |
BREAK: remove auto-init behaviour
In the event that the project could not be found, stop BuildStream from
asking if the user would like to create a new project. Exit with error
instead, and give a hint to the user in case they're new.
As proposed on the mailing list here:
https://mail.gnome.org/archives/buildstream-list/2018-December/msg00082.html
The new interaction looks like this:
$ bst show nonsuch.bst
No project found. You can create a new project like so:
bst init
Error loading project: None of ['project.conf', '.bstproject.yaml']
found in '/src/temp/blah' or any of its parent directories
Fixes #826
Diffstat (limited to 'buildstream/_context.py')
-rw-r--r-- | buildstream/_context.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/buildstream/_context.py b/buildstream/_context.py index a3487a794..e0eea99ff 100644 --- a/buildstream/_context.py +++ b/buildstream/_context.py @@ -117,10 +117,6 @@ class Context(): # Whether or not to attempt to pull build trees globally self.pull_buildtrees = None - # Boolean, whether to offer to create a project for the user, if we are - # invoked outside of a directory where we can resolve the project. - self.prompt_auto_init = None - # Boolean, whether we double-check with the user that they meant to # remove a workspace directory. self.prompt_workspace_close_remove_dir = None @@ -258,12 +254,10 @@ class Context(): prompt = _yaml.node_get( defaults, Mapping, 'prompt') _yaml.node_validate(prompt, [ - 'auto-init', 'really-workspace-close-remove-dir', + 'really-workspace-close-remove-dir', 'really-workspace-close-project-inaccessible', 'really-workspace-reset-hard', ]) - self.prompt_auto_init = _node_get_option_str( - prompt, 'auto-init', ['ask', 'no']) == 'ask' self.prompt_workspace_close_remove_dir = _node_get_option_str( prompt, 'really-workspace-close-remove-dir', ['ask', 'yes']) == 'ask' self.prompt_workspace_close_project_inaccessible = _node_get_option_str( |