Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gexe.Envs function env variable value cannot contain a dot #50

Open
heylongdacoder opened this issue Dec 3, 2023 · 3 comments
Open
Assignees

Comments

@heylongdacoder
Copy link

Code to reproduce:

package main

import (
	"fmt"
	"os"
	"strings"

	"github.com/vladimirvivien/gexe"
)

func main() {
	result := gexe.Envs("GEXE_TEST=kind.local").Run("env")
	if result == "" {
		os.Exit(1)
	}

	r := strings.Split(result, "\n")
	for _, rr := range r {
		if strings.Contains(rr, "GEXE_TEST") {
			fmt.Println(rr)
		}
	}
}

Result:

GEXE_TEST=kind

Expected Result:

GEXE_TEST=kind.local
@heylongdacoder
Copy link
Author

I suspect this is caused by the regex(https://github.com/vladimirvivien/gexe/blob/main/vars/variables.go#L14). Will try to fix this 🤔

@vladimirvivien
Copy link
Owner

@heylongdacoder wow. It's late, but will take a look. Thanks for pointing that out.
Need fuzz for this package.

@vladimirvivien vladimirvivien self-assigned this Oct 20, 2024
@vladimirvivien
Copy link
Owner

@heylongdacoder this can be closed. Fixed in latest release v0.4.0.

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

No branches or pull requests

2 participants