mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
this is so complicated
This commit is contained in:
+3
-2
@@ -310,7 +310,6 @@ class TaskScript(BaseAction):
|
||||
# Last script comes first.
|
||||
first_natural_line = sources[-1].split("\n", 1)[0]
|
||||
except IndexError:
|
||||
# TODO: maybe not.
|
||||
first_natural_line = "#!/usr/bin/env bash"
|
||||
|
||||
# Check if there's a shebang. If so, disable injection.
|
||||
@@ -321,7 +320,9 @@ class TaskScript(BaseAction):
|
||||
if insert_source and Bakefile._is_safe_to_inject(shebang=shebang):
|
||||
init_source = f". <(bake --source {insert_source})"
|
||||
yield init_source
|
||||
source_container.extend(sources)
|
||||
source_container.extend(sources)
|
||||
else:
|
||||
source_container.extend(sources[-1:])
|
||||
|
||||
else:
|
||||
shebang = "#!/usr/bin/env bash"
|
||||
|
||||
Reference in New Issue
Block a user