-
Notifications
You must be signed in to change notification settings - Fork 638
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
Fix nerdctl info on Windows #3158
Conversation
What was the issue on Windows? |
@AkihiroSuda Filed a bug #3160 |
1389735
to
4b476c4
Compare
50b4b1e
to
8e3cb73
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good, The windows code looks fine, a couple minor nits on the printing function
@@ -153,13 +153,45 @@ func prettyPrintInfoDockerCompat(stdout io.Writer, stderr io.Writer, info *docke | |||
// Storage Driver is not really Server concept for nerdctl, but mimics `docker info` output | |||
fmt.Fprintf(w, " Storage Driver: %s\n", info.Driver) | |||
fmt.Fprintf(w, " Logging Driver: %s\n", info.LoggingDriver) | |||
fmt.Fprintf(w, " Cgroup Driver: %s\n", info.CgroupDriver) | |||
fmt.Fprintf(w, " Cgroup Version: %s\n", info.CgroupVersion) | |||
printF(w, " Cgroup Driver: ", info.CgroupDriver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space?
there isn't anything particular wrong with this but it might be simpler to either to print blank or wrap it like info.warnings
below:
if info.CgroupDriver != "" { fmt.Fprintf(w, " Cgroup Driver: %s\n",, CgroupDriver ) }
fmt.Fprintf(w, " %s: %s\n", label, dockerCompatInfo) | ||
} | ||
|
||
func printSecurityOptions(w io.Writer, securityOptions []string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here to match what is done with warnings i.e if (len(securityoptions) > 0)
....
@@ -175,21 +207,7 @@ func prettyPrintInfoDockerCompat(stdout io.Writer, stderr io.Writer, info *docke | |||
if k == "name" { | |||
continue | |||
} | |||
fmt.Fprintf(w, " %s: %s\n", cases.Title(language.English).String(k), v) | |||
fmt.Fprintf(w, " %s:\t%s\n", cases.Title(language.English).String(k), v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the tab be here? I don't see it used in rest of the print statements
Signed-off-by: Tina Murimi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
What does this PR do?
The nerdctl info command currently lacks certain information specific to the Windows OS. The necessary methods to retrieve this information are not yet implemented.
infoutil_windows.go#L29-L36C2
This PR aims to address the missing Windows OS-specific information in the nerdctl info command by implementing the required methods.
Bug reference:
Bug #3160 Windows system information missing in "nerdctl info"