mirror of https://github.com/golang/go.git
misc/wasm: set non-empty default for os.Args
os.Args is usually never empty and the flag package panics if it is. This commit makes os.Args default to ["js"] for js/wasm. Change-Id: Iba527145686487b052da438fca40159e57e61a81 Reviewed-on: https://go-review.googlesource.com/117475 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
afae876b31
commit
96faeb0bb0
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
global.Go = class {
|
||||
constructor() {
|
||||
this.argv = [];
|
||||
this.argv = ["js"];
|
||||
this.env = {};
|
||||
this.exit = (code) => {
|
||||
if (code !== 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue