Skip to content

Commit 7252202

Browse files
committed
exec/shebang: Allow spaces between shebang and interpreter path
1 parent febd2fe commit 7252202

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

kernel/src/vfs/exec/shebang.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ impl ExecFormat for ShebangFormat {
4242
// Parse the shebang command line.
4343
let mut args = interp
4444
.split(|&x| x == b' ')
45+
.filter(|x| !x.is_empty()) // Skip whitespace.
4546
.map(|x| x.to_vec())
4647
.collect::<Vec<_>>();
4748
args.append(&mut info.argv); // Append the rest to argv.

0 commit comments

Comments
 (0)