App-Rakubrew

 view release on metacpan or  search on metacpan

lib/App/Rakubrew/Shell/Cmd.pm  view on Meta::CPAN

2. Add the following code to the end of the autorun script you linked in step 1:

    \@echo off
    setlocal EnableDelayedExpansion
    set "cmd=!cmdcmdline!"
    if "!cmd!" == "!cmd:/=!" (
        endlocal
        FOR /f "delims=" \%\%i in ('"$brew_exec" init Cmd') do \@\%\%i
    )

  You can easily do that from a CMD prompt using the following command:

    (
    echo \@echo off
    echo setlocal EnableDelayedExpansion
    echo set "cmd=!cmdcmdline!"
    echo if "!cmd!" == "!cmd:/=!" ^(
    echo     endlocal
    echo     FOR /f "delims=" \%\%i in ^('"$brew_exec" init Cmd'^) do \@\%\%i
    echo ^)
    ) >> "\%USERPROFILE\%\\Documents\\CMD_profile.cmd"

lib/App/Rakubrew/Update.pm  view on Meta::CPAN

    if ($^O =~ /win32/i) {
        # Windows has no real exec(). In addition all the standard perl
        # utilities to start processes automatically make the started process
        # inherit all handles of the parent. This has the effect that it's
        # impossible in the child to delete the parents executable file even
        # when the parent has already exited. So we use the lower level
        # Win32::Process::Create with the 4th argument (inheritHandles) set to 0
        # to get rid of the handles preventing the deletion of the parent
        # executable.

        say 'You will now see a command prompt, even though the update process is still running.';
        say 'This is caused by a quirk in Windows\' process handling.';
        say 'Just wait a few seconds until an "Update successful!" message shows up';
        my $ProcessObj;
        if (!Win32::Process::Create(
            $ProcessObj,
            $update_file,
            Win32::ShellQuote::quote_native(
                $update_file,
                'internal_update',
                $App::Rakubrew::VERSION,



( run in 0.886 second using v1.01-cache-2.11-cpan-6aa56a78535 )