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

✨ plugins: add $GIT_DIRECTORY_NAME env variable #86

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Conversation

a-kenji
Copy link
Collaborator

@a-kenji a-kenji commented Mar 6, 2024

Expose the $GIT_DIRECTORY_NAME environment variable to the git_repositories plugin.

This is useful for setting app_ids, or tmux session names, for example.

I am not sure about error handling here.
The unwraps are there because:

  • We have a git directory, the file name should always succeed.
  • It should always be valid Utf8.

We could return an empty string in an error case, that way scripts might still succeed and fill in a default value.

Expose the `$GIT_DIRECTORY_NAME` environment variable to the git_repositories plugin.

This is useful for setting `app_ids`, or `tmux` session names, for
example.

I am not sure about error handling here.
The unwraps are there because:
- We have a git directory, the file name should always succeed.
- It should always be valid Utf8.

We could return an empty string in an error case, that way scripts might
still succeed and fill in a default value.
@a-kenji a-kenji merged commit 97ad264 into main Mar 6, 2024
1 check passed
@a-kenji a-kenji deleted the plugin/git branch March 6, 2024 13:56
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