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

sage run should be graceful if you omit the suffix #435

Open
zepumph opened this issue Feb 12, 2025 · 0 comments
Open

sage run should be graceful if you omit the suffix #435

zepumph opened this issue Feb 12, 2025 · 0 comments
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Feb 12, 2025

I'd like to improve on sage run a bit so that in simple, common cases, you don't need to add the file extension. For example, in #433, I noticed that you run a script like sage run perennial/js/scripts/push-all.js. As part of that issue, I wanted to convert it to typescript, but that would be an API breakage for all users. Instead, I would prefer to tell people to just use sage run perennial/js/scripts/push-all, and it could have the following algorithm order:

  1. Try to find the path directly
  2. Try to find the path with ".ts" added on
  3. Try to find the path with ".js" added on
  4. Fail out.

Currently, it fails out if you don't have a file suffix on it. I have found that awkward, and a bad parallel for grunt replacement. I really can't think of a spot where this would be confusing or result in a false positive or an incorrect behavior.

Tagging @samreid, but unless I hear objections, I will proceed with the graceful implementation.

@zepumph zepumph self-assigned this Feb 12, 2025
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

1 participant