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

man pages didn't cleaned after crc cleanup #4608

Open
lilyLuLiu opened this issue Feb 11, 2025 · 5 comments · May be fixed by #4611
Open

man pages didn't cleaned after crc cleanup #4608

lilyLuLiu opened this issue Feb 11, 2025 · 5 comments · May be fixed by #4611
Assignees

Comments

@lilyLuLiu
Copy link
Contributor

lilyLuLiu commented Feb 11, 2025

Test case CRC start usecase failed on windows and darwin-arm64

Both platform failed on the second check of man -P cat crc. Expecting fail but success.

@rohanKanojia mentioned that It shouldn't be running on windows.

@rohanKanojia rohanKanojia self-assigned this Feb 11, 2025
@rohanKanojia rohanKanojia moved this to Work In Progress in Project planning: crc Feb 11, 2025
@rohanKanojia
Copy link
Contributor

I will add a step to skip this if the underlying operating system is windows.

I'm facing a strange issue with MacOS. It seems there is already another tool with the name crc that has manpage already loaded: https://core.tcl-lang.org/akupries/soft/trf/trf_cmds.html

_____

NAME
       crc - Message digest "crc"

SYNOPSIS
       package require Tcl  ?8.2?

       package require Trf  ?2.1.4?

       crc ?options...? ?data?

Once I manually configure manpath to look into the location where manpages are generated, it works as expected.

Maybe we should just verify that man pages are generated the the folder rather than relying on this behavior.

rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Feb 11, 2025
…rc-org#4608)

+ Update manpages step in basic scenario to skip execution for windows
+ Instead of relying of man command output, only verify whether we've generated the man pages files correctly in the directory.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Feb 11, 2025
…rc-org#4608)

+ Update manpages step in basic scenario to skip execution for windows
+ Instead of relying of man command output, only verify whether we've generated the man pages files correctly in the directory.

Signed-off-by: Rohan Kumar <[email protected]>
@albfan
Copy link
Contributor

albfan commented Feb 11, 2025

just to mention, man exists on powershell

PS > man man

NAME
    Get-Help

SYNTAX
    Get-Help [[-Name] <string>] [-Path <string>] [-Category {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter | ExternalScript | All | DefaultHelp | DscResource | Class | Configuration}] [-Full] [-Component <string[]>] [-Functionality <string[]>] [-Role <string[]>] [<CommonParameters>]

but do not work for man -P cat

Looks like man is some alias like:

Get-Help man | more

So to disable pagination just use:

Get-Help man

@rohanKanojia
Copy link
Contributor

rohanKanojia commented Feb 11, 2025

@albfan : At the moment, this feature is not enabled on Windows. GenerateManPages is a NOOP for windows platform:

// GenerateManPages generates man pages for cli
// This method is a no-operation placeholder, it's used to make project compile.
func GenerateManPages(_ func(targetDir string) error, _ string) error {
return nil

I had mistakenly added the man step in the pipeline without noticing it had @windows tag too.

@albfan
Copy link
Contributor

albfan commented Feb 11, 2025

Got it. Looks like we use a go module that creates a markdow which is converted to roff formar

platyps is a project that turns markdown into powershell help:

https://mikefrobbins.com/2023/11/30/generating-powershell-module-documentation-with-platyps/

maybe an option to consider

@rohanKanojia
Copy link
Contributor

maybe an option to consider

@albfan : Thanks, sounds like something we can add as a follow-up. I've created a new issue #4610 for this enhancement. Please feel free to add anything in case I missed.

rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Feb 12, 2025
…rc-org#4608)

+ Update manpages step in basic scenario to skip execution for windows
+ Instead of relying of man command output, only verify whether we've generated the man pages files correctly in the directory.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Feb 13, 2025
…rc-org#4608)

+ Update manpages step in basic scenario to skip execution for windows
+ Instead of relying of man command output, only verify whether we've generated the man pages files correctly in the directory.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Feb 13, 2025
…rc-org#4608)

+ Update manpages step in basic scenario to skip execution for windows
+ Instead of relying of man command output, only verify whether we've generated the man pages files correctly in the directory.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Feb 17, 2025
…rc-org#4608)

+ Update manpages step in basic scenario to skip execution for windows
+ Instead of relying of man command output, only verify whether we've generated the man pages files correctly in the directory.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Feb 20, 2025
…rc-org#4608)

+ Update manpages step in basic scenario to skip execution for windows
+ Instead of relying of man command output, only verify whether we've generated the man pages files correctly in the directory.

Signed-off-by: Rohan Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Work In Progress
Development

Successfully merging a pull request may close this issue.

3 participants