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 · 1 comment
Open

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 🤔

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

1 participant