rokucommunity / ropm

A package manager for the Roku platform.
MIT License
34 stars 6 forks source link

ropm clean does not appear to work #5

Closed georgejecook closed 4 years ago

georgejecook commented 4 years ago
TwitchBronBron commented 4 years ago

strange. The ropm clean function will walk through the host project's rootDir and find and delete every roku_modules folder, and then delete any empty parent folders of roku_modules folders. I know that I tested this locally at one point. Did you perhaps change the rootDir of your host project?

I don't have a ropm clean spec just yet, but internal to the ropm install command it actually leverages the ropm clean command. This test proves that files get cleaned up: https://github.com/rokucommunity/ropm/blob/master/src/commands/InstallCommand.spec.ts#L160

georgejecook commented 4 years ago

easy to reproduce

mkdir r
cd r
mkdir src
mkdir src/source
mkdir src/components
ropm init
#update package.json to add
  "ropm": {
    "rootDir": "src"
  },
ropm install rooibos-roku
ls src/source/roku_modules/rooibosroku
ropm clean
ls src/source/roku_modules/rooibosroku
TwitchBronBron commented 4 years ago

Fixed by #8. This was due to a bug in the clean command that wasn't properly reading the host's ropm.rootDir package.json property.