Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.
This repository was archived by the owner on Jul 11, 2022. It is now read-only.

segfault adding a site #78

@angrybrad

Description

@angrybrad
~/dev/support/craft2.support.test
❯ nitro add craft2.support.test
What should the hostname be? [craft2.support.test]: █
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1465daf]

goroutine 1 [running]:
github.com/craftcms/nitro/internal/helpers.FindWebRoot.func1(0xc000024280, 0x3f, 0x0, 0x0, 0x162ca60, 0xc00011c060, 0x0, 0xc00011a018)
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/internal/helpers/webroot.go:12 +0x2f
path/filepath.Walk(0xc000024280, 0x3f, 0xc000197758, 0xc000197768, 0x100bbab)
	/usr/local/Cellar/go/1.14.2_1/libexec/src/path/filepath/path.go:404 +0x6a
github.com/craftcms/nitro/internal/helpers.FindWebRoot(0xc000024280, 0x3f, 0x0, 0x0, 0x0, 0xc0000242c0)
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/internal/helpers/webroot.go:11 +0x66
github.com/craftcms/nitro/internal/cmd.glob..func1(0x1987be0, 0xc000075740, 0x1, 0x1, 0x0, 0x0)
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/internal/cmd/add.go:64 +0x1b29
github.com/spf13/cobra.(*Command).execute(0x1987be0, 0xc000075700, 0x1, 0x1, 0x1987be0, 0xc000075700)
	/Users/jasonmccallister/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0x198ade0, 0x0, 0x0, 0x0)
	/Users/jasonmccallister/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/jasonmccallister/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/craftcms/nitro/internal/cmd.Execute()
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/internal/cmd/root.go:53 +0x2d
main.main()
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/cmd/cli/main.go:8 +0x20

nitrol.yaml when running this command

name: nitro-local
php: "7.4"
cpus: "1"
disk: 100G
memory: 6G
mounts:
- source: ~/dev/support/craft3.support.test
  dest: /nitro/sites/craft3.support.test
databases:
- engine: mysql
  version: "5.7"
  port: "3306"
- engine: postgres
  version: "12"
  port: "5432"
sites:
- hostname: craft3.support.test
  webroot: /nitro/sites/craft3.support.test/web

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions