Commit a5fcff8c authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

fix(meepctl): safely handle filenames with spaces in dockerize checksum

parent 275ba004
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ func dockerize(targetName string, repo string, cobraCmd *cobra.Command) {
	}

	// Obtain checksum of bin folder contents to add as a label in docker image
	cmd = exec.Command("/bin/sh", "-c", "find "+bindir+" -type f | xargs sha256sum | sort | sha256sum")
	cmd = exec.Command("/bin/sh", "-c", "find "+bindir+" -type f -print0 | xargs -0 sha256sum | sort | sha256sum")
	output, _ := utils.ExecuteCmd(cmd, cobraCmd)
	checksum := strings.Split(output, " ")