Skip to content

Commit b967c90

Browse files
authored
Address new shellcheck nits
Also adopt new Ubuntu and actions/checkout. Follows whatwg/html#8398.
1 parent 18b6e24 commit b967c90

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ on:
99
jobs:
1010
build:
1111
name: Build
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-22.04
1313
env:
1414
IMAGE_NAME: whatwg/html-build
1515
steps:
1616
- name: Checkout whatwg/html-build
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818
with:
1919
fetch-depth: 0
2020
- name: Shellcheck
@@ -24,7 +24,7 @@ jobs:
2424
- name: Docker build
2525
run: ci-build/docker-build.sh
2626
- name: Checkout whatwg/html
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@v3
2828
with:
2929
repository: whatwg/html
3030
path: html

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ function relativePath {
403403
local commonPart=$source
404404
local result=""
405405

406-
while [[ "${target#$commonPart}" == "${target}" ]]; do
406+
while [[ "${target#"$commonPart"}" == "${target}" ]]; do
407407
# no match, means that candidate common part is not correct
408408
# go up one level (reduce common part)
409409
commonPart=$(dirname "$commonPart")
@@ -422,7 +422,7 @@ function relativePath {
422422

423423
# since we now have identified the common part,
424424
# compute the non-common part
425-
local forwardPart="${target#$commonPart}"
425+
local forwardPart="${target#"$commonPart"}"
426426

427427
# and now stick all parts together
428428
if [[ $result != "" ]] && [[ $forwardPart != "" ]]; then

0 commit comments

Comments
 (0)