diff options
| -rw-r--r-- | sys/src/cmd/sam/shell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/sam/shell.c b/sys/src/cmd/sam/shell.c index 494bbf4a3..5028e6e4a 100644 --- a/sys/src/cmd/sam/shell.c +++ b/sys/src/cmd/sam/shell.c @@ -93,7 +93,7 @@ plan9(File *f, int type, String *s, int nest) close(0); /* so it won't read from terminal */ open("/dev/null", 0); } - putenv("%", Strtoc(&f->name)); + putenv("%", f == nil ? "" : Strtoc(&f->name)); execl(SHPATH, SH, "-c", Strtoc(&plan9cmd), nil); exits("exec"); } |
