You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/env zx
// Copyright 2021 Google LLC// // Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.// You may obtain a copy of the License at// // https://www.apache.org/licenses/LICENSE-2.0// // Unless required by applicable law or agreed to in writing, software// distributed under the License is distributed on an "AS IS" BASIS,// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.// See the License for the specific language governing permissions and// limitations under the License.await$`ls -1 | wc -l`letbranch=await$`git branch --show-current`await$`printf ${branch} | wc`await$`test -f package.json`
Actual Behavior
The example script doen't work.
$ ./test.mjs
$ ls -1 | wc -l # Note: This line is zx output.
/bin/sh: 1: set: Illegal option -o pipefail
at file:///home/hata6502/zx-test/test.mjs:17:8
I think this error is occured by using sh instead of bash. set -euo pipefail; seems not work in sh.
$ bash
$ set -euo pipefail;echo"test"test
$ sh
$ set -euo pipefail;echo"test"
sh: 1: set: Illegal option -o pipefail
Steps to Reproduce the Problem
Make test.mjs.
Run chmod +x test.mjs
Run ./test.mjs
Specifications
Version: 1.1.0
Platform:
OS: Ubuntu 20.04
The text was updated successfully, but these errors were encountered:
Expected Behavior
The example script works correctly.
Actual Behavior
The example script doen't work.
I think this error is occured by using
sh
instead ofbash
.set -euo pipefail;
seems not work insh
.Steps to Reproduce the Problem
test.mjs
.chmod +x test.mjs
./test.mjs
Specifications
The text was updated successfully, but these errors were encountered: