Skip to content

Problem with 'remove' command on Windows #361

@neil-pearce

Description

@neil-pearce

When a PHAR is installed a link is created under tools; on Windows this is a .BAT file (eg psalm.bat). On a 'remove' the unlink doesn't use the .bat file.

D:\Development\Tools>phive remove psalm
Phive 0.15.0 - Copyright (C) 2015-2022 by Arne Blankerts, Sebastian Heuer and Contributors
Removing Phar psalm 4.22.0
[ERROR] An error occurred while processing your request:

      unlink(D:\Development\Tools\PHIVE\tools\psalm): No such file or directory

      #0 src/commands/remove/RemoveCommand.php(58)
      #1 unknown file(0): PharIo\Phive\Cli\Runner->errorHandler()
      #2 src/commands/remove/RemoveCommand.php(58): unlink()
      #3 src/shared/cli/Runner.php(241): PharIo\Phive\RemoveCommand->execute()
      #4 src/shared/cli/Runner.php(95): PharIo\Phive\Cli\Runner->execute()
      #5 (350): PharIo\Phive\Cli\Runner->run()
      #6 {main}

      Environment: PHP 8.1.2 (on Windows NT 10.0)
      Phive Version: 0.15.0

      This should not have happened and is most likely a bug.
      Please report it at https://github.com/phar-io/phive/issues, make sure you include
      the full output of this error message. Thank you!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions