Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go into setup mode if running outside a Bazel workspace #85

Open
f0rmiga opened this issue Dec 11, 2021 · 3 comments
Open

Go into setup mode if running outside a Bazel workspace #85

f0rmiga opened this issue Dec 11, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@f0rmiga
Copy link
Contributor

f0rmiga commented Dec 11, 2021

note for later (maybe a TODO?) we should offer to help if the user actually meant the cwd to be a workspace - go interactive and into a setup mode

Originally posted by @alexeagle in #83 (comment)

@f0rmiga f0rmiga added this to the 1.0 milestone Jan 11, 2022
@mattem mattem added the enhancement New feature or request label Mar 21, 2022
@stabai
Copy link

stabai commented Jun 20, 2022

It's sometimes useful to just run an executable to ensure it's been installed and is working properly, but as of v0.5.0, there's no command that simply runs and succeeds without being inside of a Bazel workspace. It would be nice if aspect version, aspect help, or really any command would return a success code when run from any folder.

@f0rmiga
Copy link
Contributor Author

f0rmiga commented Jun 20, 2022

@stabai I can see that those commands should not depend on being inside a valid Bazel workspace. On the other hand, if you want to check if an executable is installed correctly, the canonical way is to verify its checksum hash. You can additionally call which <program>, which (no pun intended) would tell you the program also got the right permission flags.

@stabai
Copy link

stabai commented Jun 21, 2022

True, but those sorts of checks can't answer a few things:

  • Is the executable permission set on the file (often not right after download)?
  • Is the file in quarantine by macOS (often true right after download)?
  • Is the application able to access any dependent libraries that are required?

The reason I'm thinking about it this way is that I need to automate this check. Currently, the best way seems to be the following:

  1. Create a WORKSPACE file in a directory
  2. Run aspect version from that directory
  3. Delete the WORKSPACE file

This is in some ways the most realistic way to verify the application is working, since it tests it against a valid environment. However, I'm not in love with creating and deleting files to do it.

@gregmagolan gregmagolan removed this from the CLI MVP - Release 1.0.0 milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

4 participants