Permalink
Browse files

Source ‘bash_init.sh’ for ‘require_cmd’.

The rule is that only commands without shebang has implicit sourcing of this initialization file. However, the way it is implemented in TextMate 1.x is by setting BASH_ENV in the environment for the command being executed, so if this command later runs a bash script, the variable is still in effect.

2.0 changes this to the strict interpretation of the rule so we need to explicitly source the initialization file if we use any of the functions it declares.

This commit still provides compatibility with TextMate 1.x. Ideally we add the command requirements to the bundle items (requires 2.0).
  • Loading branch information...
1 parent 79a6a6d commit d9e31574b7b846d207017bf1fbdabfc82a1480ad @sorbits sorbits committed Feb 22, 2012
Showing with 7 additions and 0 deletions.
  1. +1 −0 Support/bin/gobin
  2. +1 −0 Support/bin/goversion
  3. +1 −0 Support/gocomp
  4. +1 −0 Support/gomake
  5. +1 −0 Support/gopack
  6. +1 −0 Support/gorun
  7. +1 −0 Support/gotest
View
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+. "$TM_SUPPORT_PATH/lib/bash_init.sh"
. goarch
View
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+. "$TM_SUPPORT_PATH/lib/bash_init.sh"
require_cmd "$GC"
View
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+. "$TM_SUPPORT_PATH/lib/bash_init.sh"
. gobin
. goversion
View
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+. "$TM_SUPPORT_PATH/lib/bash_init.sh"
. gobin
. goroot
View
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+. "$TM_SUPPORT_PATH/lib/bash_init.sh"
. gobin
. goversion
View
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+. "$TM_SUPPORT_PATH/lib/bash_init.sh"
. gobin
. goversion
View
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+. "$TM_SUPPORT_PATH/lib/bash_init.sh"
. gobin
. goversion

0 comments on commit d9e3157

Please sign in to comment.