Skip to content

Commit 921ff2f

Browse files
committed
fix: #140 added shebang support
1 parent 783995c commit 921ff2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/commands/run.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ pub async fn run_command(
4141
run_command_prerequisite(&actual_path, stdlib_path, check_teal_code, extra_args).await;
4242
spawn_termination_task();
4343

44+
// Remove the Shebang lines
45+
let user_file = user_file
46+
.lines()
47+
.filter(|line| !line.starts_with("#!"))
48+
.collect::<Vec<_>>()
49+
.join("\n");
50+
4451
if let Some(is_teal) = PathBuf::from(&actual_path).extension()
4552
&& is_teal == "tl"
4653
{

0 commit comments

Comments
 (0)