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

CLI tool assumes the user script is Python #60

Closed
lnicola opened this issue Sep 12, 2023 · 1 comment
Closed

CLI tool assumes the user script is Python #60

lnicola opened this issue Sep 12, 2023 · 1 comment

Comments

@lnicola
Copy link
Contributor

lnicola commented Sep 12, 2023

There's nothing specific to Python in the implementation, so it could work for any kind of program, but the implementation assumes Python. Simply replacing https://github.com/lfwa/carbontracker/blob/master/carbontracker/cli.py#L23 with subprocess.run([args.script], check=True) would fix this (with the caveat that the script needs to be marked as executable and start with e.g. #!/usr/bin/env python).

@PedramBakh
Copy link
Collaborator

Thanks for bringing this to our attention. We've addressed your points in patch v1.2.1. You can now use the tool with arbitrary commands, like: carbontracker myscript arg1 arg2 --log_dir ./logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants