Skip to content

[Linux] fedify init 'move the contents to the trash' actually remove contents permanently #989

Description

@lego37yoon

Environment

  • Package : @fedify/cli 2.3.2, 2.3.4 installed by mise
  • Runtime: Node.js 22.15.1
  • Operating System: Ubuntu 26.04 LTS (Kubuntu flavor; native)

Problem

Fedify CLI automatically detect whether project folder is empty or not, and if it is not empty, ask users to move their contents to the trash like this:

             ___      _____        _ _  __
            /'_')    |  ___|__  __| (_)/ _|_   _
     .-^^^-/  /      | |_ / _ \/ _` | | |_| | | |
   __/       /       |  _|  __/ (_| | |  _| |_| |
  <__.|_|-|_|        |_|  \___|\__,_|_|_|  \__, |
                                           |___/

✔ Project directory: [redacted]
? Directory "[redacted]" is not empty.
Do you want to use it anyway? no
✔ Project directory:  [redacted]
? Directory " [redacted]" is not empty.
Do you want to use it anyway? yes
? Do you want to move the contents of "[redacted]" to the trash?
If you choose "No", you should choose another directory. yes

Expected Behavior

Move to the trash usually means user can restore their contents from Trash feature, as @fedify/cli already does in both Windows PowerShell and macOS environment.

Actual Behavior

On native Linux environment, even FreeDesktop.org Trash feature supported, it permanently remove user's contents using rm -rf

Existing issues

This issues does not directly related to this issue, but replacing package may lead syntax changes and merge conflicts if PR submitted at the similar time.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions