Skip to content

Commit 21a961f

Browse files
committed
attempt to fix windows
1 parent a791d04 commit 21a961f

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed
Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
22
set -euo pipefail
3-
source "$(dirname "$0")/verify.sh"
4-
verify_output "$(dirname "$0")/outer_calls_inner_script_python.out"
3+
4+
# rules_python_get_runfiles_path is a helper to correctly look up runfiles.
5+
# It is needed because on Windows, the path to a runfile can be absolute,
6+
# which is not something that bash can handle. So we use cygpath to fix it up.
7+
rules_python_get_runfiles_path() {
8+
local path="$1"
9+
if [[ -f /bin/cygpath ]]; then
10+
cygpath -u "${path}"
11+
else
12+
echo "${path}"
13+
fi
14+
}
15+
16+
source "$(rules_python_get_runfiles_path "$(dirname "$0")/verify.sh")"
17+
verify_output "$(rules_python_get_runfiles_path "$(dirname "$0")/outer_calls_inner_script_python.out")"
Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
22
set -euo pipefail
3-
source "$(dirname "$0")/verify.sh"
4-
verify_output "$(dirname "$0")/outer_calls_inner_system_python.out"
3+
4+
# rules_python_get_runfiles_path is a helper to correctly look up runfiles.
5+
# It is needed because on Windows, the path to a runfile can be absolute,
6+
# which is not something that bash can handle. So we use cygpath to fix it up.
7+
rules_python_get_runfiles_path() {
8+
local path="$1"
9+
if [[ -f /bin/cygpath ]]; then
10+
cygpath -u "${path}"
11+
else
12+
echo "${path}"
13+
fi
14+
}
15+
16+
source "$(rules_python_get_runfiles_path "$(dirname "$0")/verify.sh")"
17+
verify_output "$(rules_python_get_runfiles_path "$(dirname "$0")/outer_calls_inner_system_python.out")"

0 commit comments

Comments
 (0)