Change %q in logs and errors to %#q [Part2]#5017
Conversation
|
Lints tests failed, but I am not sure how to resolve it because:
I would be grateful if you could let me know how to address them (if I should change something). |
|
Please rebase on latest |
|
Thank you for your advice. |
jandubois
left a comment
There was a problem hiding this comment.
Looks good, but has a few minor issues.
| pidFile := filepath.Join(inst.Dir, filenames.PIDFile(*inst.Config.VMType)) | ||
| if _, err := os.Stat(pidFile); !errors.Is(err, os.ErrNotExist) { | ||
| logrus.Errorf("pidfile %q already exists", pidFile) | ||
| logrus.Errorf("pidfile %#qq already exists", pidFile) |
There was a problem hiding this comment.
| logrus.Errorf("pidfile %#qq already exists", pidFile) | |
| logrus.Errorf("pidfile %#q already exists", pidFile) |
|
|
||
| func (l *LimaVzDriver) Start(ctx context.Context) (chan error, error) { | ||
| logrus.Infof("Starting VZ (hint: to watch the boot progress, see %q)", filepath.Join(l.Instance.Dir, "serial*.log")) | ||
| logrus.Infof("Starting VZ (hint: to watch the boot progress, see %#qq)", filepath.Join(l.Instance.Dir, "serial*.log")) |
There was a problem hiding this comment.
| logrus.Infof("Starting VZ (hint: to watch the boot progress, see %#qq)", filepath.Join(l.Instance.Dir, "serial*.log")) | |
| logrus.Infof("Starting VZ (hint: to watch the boot progress, see %#q)", filepath.Join(l.Instance.Dir, "serial*.log")) |
| } | ||
| if !strings.Contains(string(out), "com.apple.security.hypervisor") { | ||
| return fmt.Errorf("binary %q seems signed but lacking the \"com.apple.security.hypervisor\" entitlement", qExe) | ||
| return fmt.Errorf("binary %#q seems signed but lacking the \"com.apple.security.hypervisor\" entitlement", qExe) |
There was a problem hiding this comment.
Should we use backticks everywhere?
| return fmt.Errorf("binary %#q seems signed but lacking the \"com.apple.security.hypervisor\" entitlement", qExe) | |
| return fmt.Errorf("binary %#q seems signed but lacking the `com.apple.security.hypervisor` entitlement", qExe) |
There are more instances of \" around; I can't remember, but though we changed all of them.
Signed-off-by: mie313 <mie313.tanaka@gmail.com>
|
Thank you for your review. |
Change %q in logs and errors to %#q (all files in the following directories) .
cmd/lima-guestagentpkg/apfspkg/autostartpkg/cacheutilpkg/cidatapkg/copytoolpkg/downloaderpkg/driverpkg/driverutilpkg/editutilpkg/envutilpkg/fileutilspkg/limayamlRelated issue: #4898
This PR is a continuation of the work from #4909 .
@jandubois
I also addressed your last comments in #4909 in this PR.