-
Notifications
You must be signed in to change notification settings - Fork 373
Expand file tree
/
Copy pathconductor-exec
More file actions
executable file
·24 lines (23 loc) · 955 Bytes
/
conductor-exec
File metadata and controls
executable file
·24 lines (23 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env zsh
# Wrapper script to run commands in Conductor with proper tool versions
# Usage: bin/conductor-exec <command> [args...]
#
# This is needed because Conductor (and other non-interactive shells) don't
# source .zshrc, so version manager PATH configuration isn't active by default.
#
# - If mise is available: uses `mise exec` for correct tool versions
# - Otherwise: falls back to direct execution (for asdf/rbenv/nvm users)
#
# Examples:
# bin/conductor-exec ruby --version # Uses correct Ruby version
# bin/conductor-exec bundle exec rubocop # Correct Ruby for linting
# bin/conductor-exec git commit -m "msg" # Pre-commit hooks work correctly
# bin/conductor-exec pnpm install # Uses correct Node version
#
# See: https://github.com/shakacode/react_on_rails-demos/issues/105
if command -v mise &> /dev/null; then
exec mise exec -- "$@"
else
# Fall back to direct execution for non-mise users
exec "$@"
fi