Panic when workspace path contains reserved characters

Open Beginner friendly
#896 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go

Research direction

Start at cmd/configure.go:147 and reproduce the failure with exercism.exe configure --workspace "c:\?" on Windows. Trace why the reserved workspace path leads to a nil pointer, then verify that configure reports the invalid path without panicking.

Written by the indexing model from the issue text.

Description

Version

exercism-3.0.13-windows-x86_64

Os

Windows 7

Reproduce

exercism.exe configure --workspace "c:\?"

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x84d9e9]

goroutine 1 [running]:
github.com/exercism/cli/cmd.runConfigure(0x95ba0b, 0x7, 0xc00006e4a0, 0xf, 0xc0000861e0, 0x28, 0x967b7a, 0x1a, 0xc0000706d0, 0x8, ...)
        /Users/ekingery/dev/exercism/cli/cmd/configure.go:147 +0x959
github.com/exercism/cli/cmd.glob..func1(0xdd5cc0, 0xc000064e40, 0x0, 0x2, 0x0, 0x0)
        /Users/ekingery/dev/exercism/cli/cmd/configure.go:43 +0x167
github.com/spf13/cobra.(*Command).execute(0xdd5cc0, 0xc000064e00, 0x2, 0x2, 0xdd5cc0, 0xc000064e00)
        /Users/ekingery/golang/pkg/mod/github.com/spf13/cobra@v0.0.0-20170731170427-b26b538f6930/command.go:649 +0x40f
github.com/spf13/cobra.(*Command).ExecuteC(0xdd65c0, 0x0, 0x0, 0x0)
        /Users/ekingery/golang/pkg/mod/github.com/spf13/cobra@v0.0.0-20170731170427-b26b538f6930/command.go:728 +0x2c3
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/ekingery/golang/pkg/mod/github.com/spf13/cobra@v0.0.0-20170731170427-b26b538f6930/command.go:687
github.com/exercism/cli/cmd.Execute()
        /Users/ekingery/dev/exercism/cli/cmd/root.go:39 +0x34
main.main()
        /Users/ekingery/dev/exercism/cli/exercism/main.go:6 +0x27
Dominant language
Go
Stars
1.4k
Forks
363
Avg merge
6d 13h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from exercism/cli

All issues in exercism/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.