Skip to content

BUG: Install.cmd won't install on Windows #731

@sachin-gupta

Description

@sachin-gupta

install.cmd uses MORE +2 command which throws error Too many arguments as extra command switch /E is missing. This should be MORE /E +2, see help on more.exe. Tried on system and verified. Have attched corrected snippet:

Snippet

echo Installing binaries...
FOR /R "%GITEXTRAS%\bin" %%i in (*.*) DO (
    ECHO "WRITING = %%~ni"
    ECHO #^^!/usr/bin/env bash > "%PREFIX%\bin\%%~ni"
    TYPE "%GITEXTRAS%\helper\reset-env" >> "%PREFIX%\bin\%%~ni"
    TYPE "%GITEXTRAS%\helper\git-extra-utility" >> "%PREFIX%\bin\%%~ni"
    TYPE "%GITEXTRAS%\helper\is-git-repo" >> "%PREFIX%\bin\%%~ni"
    MORE /E +2 "%GITEXTRAS%\bin\%%~ni" >> "%PREFIX%\bin\%%~ni"
)

FOR %%i in (%COMMANDS_WITHOUT_REPO%) DO (
    ECHO "WRITING = %%i"
    ECHO #^^!/usr/bin/env bash > "%PREFIX%\bin\%%i"
    TYPE "%GITEXTRAS%\helper\reset-env" >> "%PREFIX%\bin\%%i"
    TYPE "%GITEXTRAS%\helper\git-extra-utility" >> "%PREFIX%\bin\%%i"
    MORE /E +2 "%GITEXTRAS%\bin\%%i" >> "%PREFIX%\bin\%%i"
)

Help on More.exe

C:> more /?
Displays output one screen at a time.

MORE [/E [/C] [/P] [/S] [/Tn] [+n]] < [drive:][path]filename
command-name | MORE [/E [/C] [/P] [/S] [/Tn] [+n]]
MORE /E [/C] [/P] [/S] [/Tn] [+n] [files]

    [drive:][path]filename  Specifies a file to display one
                            screen at a time.

    command-name            Specifies a command whose output
                            will be displayed.

    /E      Enable extended features
    /C      Clear screen before displaying page
    /P      Expand FormFeed characters
    /S      Squeeze multiple blank lines into a single line
    /Tn     Expand tabs to n spaces (default 8)

            Switches can be present in the MORE environment
            variable.

    +n      Start displaying the first file at line n

    files   List of files to be displayed. Files in the list
            are separated by blanks.

    If extended features are enabled, the following commands
    are accepted at the -- More -- prompt:

    P n     Display next n lines
    S n     Skip next n lines
    F       Display next file
    Q       Quit
    =       Show line number
    ?       Show help line
    <space> Display next page
    <ret>   Display next line

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions