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

go-msi does not incorporate recent breaking API changes to go-uuid #31

Open
shabbyrobe opened this issue Feb 5, 2018 · 3 comments
Open

Comments

@shabbyrobe
Copy link

I get a build error while trying to go get:

$ go get github.com/mh-cbon/go-msi
# github.com/mh-cbon/go-msi/manifest
C:\Users\shabb\go\src\github.com\mh-cbon\go-msi\manifest\index.go:152:35: multiple-value uuid.NewV4() in single-value context
C:\Users\shabb\go\src\github.com\mh-cbon\go-msi\manifest\index.go:156:34: multiple-value uuid.NewV4() in single-value context
C:\Users\shabb\go\src\github.com\mh-cbon\go-msi\manifest\index.go:160:32: multiple-value uuid.NewV4() in single-value context
C:\Users\shabb\go\src\github.com\mh-cbon\go-msi\manifest\index.go:164:38: multiple-value uuid.NewV4() in single-value context
@ghost
Copy link

ghost commented May 9, 2018

same here..

Here is the func with the error:
https://github.com/mh-cbon/go-msi/blob/master/manifest/index.go#L149

Replace the func with this one below:

//SetGuids generates and apply guid values appropriately
func (wixFile *WixManifest) SetGuids(force bool) (bool, error) {
	updated := false
	// make uuid
	u, err := uuid.NewV4()
	if err != nil {
		return false, err
	}

	if wixFile.UpgradeCode == "" || force {

		wixFile.UpgradeCode = u.String()
		updated = true
	}
	if wixFile.Files.GUID == "" || force {
		wixFile.Files.GUID = u.String()
		updated = true
	}
	if (wixFile.Env.GUID == "" || force) && len(wixFile.Env.Vars) > 0 {

		wixFile.Env.GUID = u.String()
		updated = true
	}
	if (wixFile.Shortcuts.GUID == "" || force) && len(wixFile.Shortcuts.Items) > 0 {
		wixFile.Shortcuts.GUID = u.String()
		updated = true
	}
	return updated, nil
}

then run go test ./... just to make sure.

@ghost
Copy link

ghost commented May 9, 2018

FYI @mh-cbon

xlab pushed a commit to cloudradar/go-msi that referenced this issue Mar 20, 2019
@EliCDavis
Copy link

This is still an issue

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