From cbc4fd24bf6a47e8107c8dab4ab789c4936242df Mon Sep 17 00:00:00 2001 From: Brandon Kalinowski Date: Sat, 8 Feb 2020 05:03:54 +0000 Subject: [PATCH 1/3] fix: shebangs --- cli/js/unit_test_runner.ts | 3 ++- std/examples/catj.ts | 3 ++- std/examples/gist.ts | 3 ++- std/http/file_server.ts | 3 ++- std/testing/runner.ts | 3 ++- std/uuid/test.ts | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cli/js/unit_test_runner.ts b/cli/js/unit_test_runner.ts index dd095058f179a7..4f1711c92e1983 100755 --- a/cli/js/unit_test_runner.ts +++ b/cli/js/unit_test_runner.ts @@ -1,4 +1,5 @@ -#!/usr/bin/env -S deno run --reload --allow-run +#!/bin/sh +":" //; exec /usr/bin/env deno run --reload --allow-run "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./unit_tests.ts"; import { diff --git a/std/examples/catj.ts b/std/examples/catj.ts index 7951eeeb0f18fb..a2103734d5441b 100644 --- a/std/examples/catj.ts +++ b/std/examples/catj.ts @@ -1,4 +1,5 @@ -#!/usr/bin/env -S deno --allow-read +#!/bin/sh +":" //; exec /usr/bin/env deno run --allow-read "$0" "$@" // Ported from: https://github.com/soheilpro/catj // Copyright (c) 2014 Soheil Rashidi // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. diff --git a/std/examples/gist.ts b/std/examples/gist.ts index ead97c7e2e8184..5aeaa2d22b16db 100755 --- a/std/examples/gist.ts +++ b/std/examples/gist.ts @@ -1,4 +1,5 @@ -#!/usr/bin/env -S deno --allow-net --allow-env +#!/bin/sh +":" //; exec /usr/bin/env deno run --allow-net --allow-env "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { parse } from "https://deno.land/std/flags/mod.ts"; diff --git a/std/http/file_server.ts b/std/http/file_server.ts index acf272764d5c48..fbb66f49a126b4 100755 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -1,4 +1,5 @@ -#!/usr/bin/env -S deno --allow-net +#!/bin/sh +":" //; exec /usr/bin/env deno run --allow-net "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // This program serves files in the current directory over HTTP. diff --git a/std/testing/runner.ts b/std/testing/runner.ts index 17d5942f8915ef..a184e52262bcf0 100755 --- a/std/testing/runner.ts +++ b/std/testing/runner.ts @@ -1,4 +1,5 @@ -#!/usr/bin/env -S deno -A +#!/bin/sh +":" //; exec /usr/bin/env deno run -A "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { parse } from "../flags/mod.ts"; import { ExpandGlobOptions, expandGlob } from "../fs/mod.ts"; diff --git a/std/uuid/test.ts b/std/uuid/test.ts index 1e6e981543054c..c10e08f16bcbad 100755 --- a/std/uuid/test.ts +++ b/std/uuid/test.ts @@ -1,4 +1,5 @@ -#!/usr/bin/env -S deno run +#!/bin/sh +":" //; exec /usr/bin/env deno run "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { runIfMain } from "../testing/mod.ts"; From 6f3de3d02ba8e5ae41d24b78d1f173c31fb679b2 Mon Sep 17 00:00:00 2001 From: Brandon Kalinowski Date: Sat, 8 Feb 2020 07:02:27 +0000 Subject: [PATCH 2/3] fix: lint formatting --- cli/js/unit_test_runner.ts | 2 +- std/examples/catj.ts | 2 +- std/examples/gist.ts | 2 +- std/http/file_server.ts | 2 +- std/testing/runner.ts | 2 +- std/uuid/test.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/js/unit_test_runner.ts b/cli/js/unit_test_runner.ts index 4f1711c92e1983..e3adce597c7ec9 100755 --- a/cli/js/unit_test_runner.ts +++ b/cli/js/unit_test_runner.ts @@ -1,5 +1,5 @@ #!/bin/sh -":" //; exec /usr/bin/env deno run --reload --allow-run "$0" "$@" +":"; //; exec /usr/bin/env deno run --reload --allow-run "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./unit_tests.ts"; import { diff --git a/std/examples/catj.ts b/std/examples/catj.ts index a2103734d5441b..7574b7a38553a2 100644 --- a/std/examples/catj.ts +++ b/std/examples/catj.ts @@ -1,5 +1,5 @@ #!/bin/sh -":" //; exec /usr/bin/env deno run --allow-read "$0" "$@" +":"; //; exec /usr/bin/env deno run --allow-read "$0" "$@" // Ported from: https://github.com/soheilpro/catj // Copyright (c) 2014 Soheil Rashidi // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. diff --git a/std/examples/gist.ts b/std/examples/gist.ts index 5aeaa2d22b16db..16882b913faa08 100755 --- a/std/examples/gist.ts +++ b/std/examples/gist.ts @@ -1,5 +1,5 @@ #!/bin/sh -":" //; exec /usr/bin/env deno run --allow-net --allow-env "$0" "$@" +":"; //; exec /usr/bin/env deno run --allow-net --allow-env "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { parse } from "https://deno.land/std/flags/mod.ts"; diff --git a/std/http/file_server.ts b/std/http/file_server.ts index fbb66f49a126b4..7d4d8fbb0ddf9d 100755 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -1,5 +1,5 @@ #!/bin/sh -":" //; exec /usr/bin/env deno run --allow-net "$0" "$@" +":"; //; exec /usr/bin/env deno run --allow-net "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // This program serves files in the current directory over HTTP. diff --git a/std/testing/runner.ts b/std/testing/runner.ts index a184e52262bcf0..c10a375a2cdd52 100755 --- a/std/testing/runner.ts +++ b/std/testing/runner.ts @@ -1,5 +1,5 @@ #!/bin/sh -":" //; exec /usr/bin/env deno run -A "$0" "$@" +":"; //; exec /usr/bin/env deno run -A "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { parse } from "../flags/mod.ts"; import { ExpandGlobOptions, expandGlob } from "../fs/mod.ts"; diff --git a/std/uuid/test.ts b/std/uuid/test.ts index c10e08f16bcbad..639eef74f94995 100755 --- a/std/uuid/test.ts +++ b/std/uuid/test.ts @@ -1,5 +1,5 @@ #!/bin/sh -":" //; exec /usr/bin/env deno run "$0" "$@" +":"; //; exec /usr/bin/env deno run "$0" "$@" // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { runIfMain } from "../testing/mod.ts"; From 46e2366e7b7780162514235ba30a14a16804cfd4 Mon Sep 17 00:00:00 2001 From: Brandon Kalinowski Date: Sat, 8 Feb 2020 10:03:59 +0000 Subject: [PATCH 3/3] fix: shebang that works with prettier ASI --- cli/js/unit_test_runner.ts | 3 ++- std/examples/catj.ts | 3 ++- std/examples/gist.ts | 3 ++- std/http/file_server.ts | 3 ++- std/testing/runner.ts | 3 ++- std/uuid/test.ts | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) mode change 100644 => 100755 std/examples/catj.ts diff --git a/cli/js/unit_test_runner.ts b/cli/js/unit_test_runner.ts index e3adce597c7ec9..23c909626b6209 100755 --- a/cli/js/unit_test_runner.ts +++ b/cli/js/unit_test_runner.ts @@ -1,5 +1,6 @@ #!/bin/sh -":"; //; exec /usr/bin/env deno run --reload --allow-run "$0" "$@" +":" //; exec /usr/bin/env deno run --reload --allow-run "$0" "$@" + .charAt(0); // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./unit_tests.ts"; import { diff --git a/std/examples/catj.ts b/std/examples/catj.ts old mode 100644 new mode 100755 index 7574b7a38553a2..c77ffedc393234 --- a/std/examples/catj.ts +++ b/std/examples/catj.ts @@ -1,5 +1,6 @@ #!/bin/sh -":"; //; exec /usr/bin/env deno run --allow-read "$0" "$@" +":" //; exec /usr/bin/env deno run --allow-read "$0" "$@" + .charAt(0); // Ported from: https://github.com/soheilpro/catj // Copyright (c) 2014 Soheil Rashidi // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. diff --git a/std/examples/gist.ts b/std/examples/gist.ts index 16882b913faa08..86a68740310f83 100755 --- a/std/examples/gist.ts +++ b/std/examples/gist.ts @@ -1,5 +1,6 @@ #!/bin/sh -":"; //; exec /usr/bin/env deno run --allow-net --allow-env "$0" "$@" +":" //; exec /usr/bin/env deno run --allow-net --allow-env "$0" "$@" + .charAt(0); // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { parse } from "https://deno.land/std/flags/mod.ts"; diff --git a/std/http/file_server.ts b/std/http/file_server.ts index 7d4d8fbb0ddf9d..112859c5f7b07b 100755 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -1,5 +1,6 @@ #!/bin/sh -":"; //; exec /usr/bin/env deno run --allow-net "$0" "$@" +":" //; exec /usr/bin/env deno run --allow-net "$0" "$@" + .charAt(0); // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // This program serves files in the current directory over HTTP. diff --git a/std/testing/runner.ts b/std/testing/runner.ts index c10a375a2cdd52..3c6dffc3f1ca05 100755 --- a/std/testing/runner.ts +++ b/std/testing/runner.ts @@ -1,5 +1,6 @@ #!/bin/sh -":"; //; exec /usr/bin/env deno run -A "$0" "$@" +":" //; exec /usr/bin/env deno run -A "$0" "$@" + .charAt(0); // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { parse } from "../flags/mod.ts"; import { ExpandGlobOptions, expandGlob } from "../fs/mod.ts"; diff --git a/std/uuid/test.ts b/std/uuid/test.ts index 639eef74f94995..b5edc6f7cac501 100755 --- a/std/uuid/test.ts +++ b/std/uuid/test.ts @@ -1,5 +1,6 @@ #!/bin/sh -":"; //; exec /usr/bin/env deno run "$0" "$@" +":" //; exec /usr/bin/env deno run "$0" "$@" + .charAt(0); // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { runIfMain } from "../testing/mod.ts";