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

Set evaluation file when autosaving to default location #2529

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

jonatanklosko
Copy link
Member

When no explicit file is selected then we don't set evaluation file and __DIR__ resolves to ".". I believe it's a better behaviour to always set the file when we are saving, even if the location is not explicit. If someone relies on __DIR__ to save files, it's not intuitive that in such case it's going to end up in CWD, and the user can always use File.cwd! if that's what they want.

@jonatanklosko jonatanklosko changed the title Set evaluation file when autosaving Set evaluation file when autosaving to default location Mar 27, 2024
@jonatanklosko
Copy link
Member Author

jonatanklosko commented Mar 27, 2024

cc @bcardarella (this is going to set the correct __ENV__.file, even when no file is selected)

Copy link

github-actions bot commented Mar 27, 2024

Uffizzi Preview deployment-48998 was deleted.

@jonatanklosko jonatanklosko merged commit 23a1727 into main Mar 27, 2024
7 checks passed
@jonatanklosko jonatanklosko deleted the jk-env-file branch March 27, 2024 08:52
spunkedy pushed a commit to spunkedy/livebook that referenced this pull request Apr 22, 2024
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

Successfully merging this pull request may close these issues.

2 participants