mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 14:22:01 +00:00
remove the ~ '/' / '\\' logic in interpreter.zig as it's now handled in shell.zig
This commit is contained in:
@@ -2112,17 +2112,7 @@ pub const Interpreter = struct {
|
||||
if (this.node.hasTildeExpansion() and this.node.atomsLen() > 1) {
|
||||
const homedir = this.base.shell.getHomedir();
|
||||
defer homedir.deref();
|
||||
if (this.current_out.items.len > 0) {
|
||||
switch (this.current_out.items[0]) {
|
||||
'/', '\\' => {
|
||||
this.current_out.insertSlice(0, homedir.slice()) catch bun.outOfMemory();
|
||||
},
|
||||
else => {
|
||||
// TODO: Handle username
|
||||
this.current_out.insert(0, '~') catch bun.outOfMemory();
|
||||
},
|
||||
}
|
||||
}
|
||||
this.current_out.insertSlice(0, homedir.slice()) catch bun.outOfMemory();
|
||||
}
|
||||
|
||||
// NOTE brace expansion + cmd subst has weird behaviour we don't support yet, ex:
|
||||
|
||||
Reference in New Issue
Block a user