Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tyilo
Copy link
Contributor

@tyilo tyilo commented Oct 24, 2024

Note: This is an issue and not a pull request.

pacur doesn't seems to like scripts containing ${}.

The following package fails to be build:

targets=(
    "debian-buster"
)
pkgname="foo"
pkgdesc="foo desc"
maintainer="Foo Bar <[email protected]>"
pkgver="0.0.1"
pkgrel="1"
arch="amd64"
sources=(
)
hashsums=(
)

package() {
    filename="foo.bar.pdf"
    echo "${filename}"
    without_extension="${filename%.*}"
    echo "$filename -> $without_extension"
}

The error message is:

panic: resolver: Failed to resolve '${filename}' in 'package[1]="echo "${filename}""'
	ORIGINAL STACK TRACE:
	github.com/pacur/pacur/resolver.(*Resolver).resolve
		/home/tyilo/go/pkg/mod/github.com/pacur/[email protected]/resolver/resolver.go:62 +0x4f0f19
	github.com/pacur/pacur/resolver.(*Resolver).Resolve
		/home/tyilo/go/pkg/mod/github.com/pacur/[email protected]/resolver/resolver.go:85 +0x4f1093
	github.com/pacur/pacur/pack.(*Pack).Resolve
		/home/tyilo/go/pkg/mod/github.com/pacur/[email protected]/pack/pack.go:164 +0x4f223c
	github.com/pacur/pacur/pack.(*Pack).Compile
		/home/tyilo/go/pkg/mod/github.com/pacur/[email protected]/pack/pack.go:282 +0x4f3a06
	github.com/pacur/pacur/cmd.Build
		/home/tyilo/go/pkg/mod/github.com/pacur/[email protected]/cmd/build.go:24 +0x541946
	github.com/pacur/pacur/cmd.Parse
		/home/tyilo/go/pkg/mod/github.com/pacur/[email protected]/cmd/cmd.go:16 +0x541aec
	main.main
		/home/tyilo/go/pkg/mod/github.com/pacur/[email protected]/main.go:8 +0x542b92
	runtime.main
		/usr/lib/go/src/runtime/proc.go:272 +0x4376ca
	runtime.goexit
		/usr/lib/go/src/runtime/asm_amd64.s:1700 +0x4717e0
	

goroutine 1 [running]:
main.main()
	/home/tyilo/go/pkg/mod/github.com/pacur/[email protected]/main.go:10 +0x2b

@tyilo tyilo changed the title Parsing of scripts with fails Parsing of scripts fails when containing ${} Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant