You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/02/16 18:43:25 UTC

[GitHub] [tvm] yelite opened a new pull request #10277: Use `/usr/bin/env bash` in shebang for all scripts under tests

yelite opened a new pull request #10277:
URL: https://github.com/apache/tvm/pull/10277


   This makes scripts executable on system without /bin/bash (NixOS). 
   
   Although this is not perfectly portable (some system may have /bin/env rather than usr/bin/env), it's better than just using /bin/bash (https://en.wikipedia.org/wiki/Shebang_(Unix)#Program_location).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] yelite commented on a change in pull request #10277: Use `/usr/bin/env bash` in shebang for all scripts under tests

Posted by GitBox <gi...@apache.org>.
yelite commented on a change in pull request #10277:
URL: https://github.com/apache/tvm/pull/10277#discussion_r808383587



##########
File path: tests/lint/check_asf_header.sh
##########
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env -S bash -e

Review comment:
       Some scripts already have `set -euxo pipefail` so I didn't add `set -e` to them




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi merged pull request #10277: Use `/usr/bin/env bash` in shebang for all scripts under tests

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #10277:
URL: https://github.com/apache/tvm/pull/10277


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] yelite commented on a change in pull request #10277: Use `/usr/bin/env bash` in shebang for all scripts under tests

Posted by GitBox <gi...@apache.org>.
yelite commented on a change in pull request #10277:
URL: https://github.com/apache/tvm/pull/10277#discussion_r808382995



##########
File path: tests/lint/check_asf_header.sh
##########
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env -S bash -e

Review comment:
       Updated. Actually it won't build without this change. The coreutil in the CI docker image might be old and doesn't have the `-S` arg for `env`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] driazati commented on a change in pull request #10277: Use `/usr/bin/env bash` in shebang for all scripts under tests

Posted by GitBox <gi...@apache.org>.
driazati commented on a change in pull request #10277:
URL: https://github.com/apache/tvm/pull/10277#discussion_r808349842



##########
File path: tests/lint/check_asf_header.sh
##########
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env -S bash -e

Review comment:
       While you're cleaning these up could you move all the `bash -e` usages into a `set -e` after the apache header everywhere? That way we can have a consistent bash invocation across all scripts
   
   ```suggestion
   #!/usr/bin/env bash
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org