Skip to content

Commit

Permalink
Merge pull request #4 from bayashi/os-stat
Browse files Browse the repository at this point in the history
improve error message
  • Loading branch information
bayashi authored Mar 20, 2024
2 parents 5cda672 + a2c2965 commit 72f63bb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ jobs:
mkdir -p $HOME/.config/irir
curl -L https://bit.ly/irir-gotest-conf > $HOME/.config/irir/irir_rule.yaml
- name: Set up test structure
run: |
mkdir testdata
mkdir testdata/foo
mkdir testdata/bar
touch testdata/bar/.git
mkdir -p testdata/baz/.git
- name: Test with the Go CLI
shell: 'script -q -e -c "bash {0}"'
run: irir gotest -- go test -v -shuffle=on -timeout=3m -cover ./...
Expand All @@ -51,7 +59,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "macOS-latest"]
os: ["macOS-latest"]

runs-on: ${{ matrix.os }}

Expand All @@ -73,5 +81,13 @@ jobs:
- name: Build
run: go build -v ./...

- name: Set up test structure
run: |
mkdir testdata
mkdir testdata/foo
mkdir testdata/bar
touch testdata/bar/.git
mkdir -p testdata/baz/.git
- name: Test with the Go CLI
run: go test ./... -race -shuffle=on -timeout=3m -cover -v
2 changes: 1 addition & 1 deletion arg.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
type options struct {
color string
noTilde bool
nonTTY bool
nonTTY bool
}

func (cli *runner) parseArgs() *options {
Expand Down
2 changes: 1 addition & 1 deletion highlightrepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (h *highlightrepo) highlightline(line string) error {
}

if _, err := os.Stat(absPath); err != nil {
return err
return fmt.Errorf("orig %s, abs %s : %w", line, absPath, err)
}

paths := strings.Split(absPath, SEP)
Expand Down

0 comments on commit 72f63bb

Please sign in to comment.