Skip to content

Commit

Permalink
feat: remove all relevant directories on uninstall (#831)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Feb 24, 2022
1 parent 331bf21 commit acd986d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
30 changes: 26 additions & 4 deletions src/commands/pack/macos.ts
Expand Up @@ -89,6 +89,16 @@ fi
#remove application source distribution
[ -e "/usr/local/lib/${config.dirname}" ] && rm -rf "/usr/local/lib/${config.dirname}"
#remove application data directory
[ -e "${config.dataDir}" ] && rm -rf "${config.dataDir}"
#remove application cache directory
[ -e "${config.cacheDir}" ] && rm -rf "${config.cacheDir}"
#remove application config directory
[ -e "${config.configDir}" ] && rm -rf "${config.configDir}"
if [ $? -eq 0 ]
then
echo "[3/3] [DONE] Successfully deleted application"
Expand All @@ -106,10 +116,22 @@ export default class PackMacos extends Command {
static description = 'pack CLI into macOS .pkg'

static flags = {
root: Flags.string({char: 'r', description: 'path to oclif CLI root', default: '.', required: true}),
'additional-cli': Flags.string({description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by "oclif pack:tarballs"`, hidden: true}),
tarball: Flags.string({char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false}),
root: Flags.string({
char: 'r',
description: 'path to oclif CLI root',
default: '.',
required: true,
}),
'additional-cli': Flags.string({
description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by "oclif pack:tarballs"`,
hidden: true,
}),
tarball: Flags.string({
char: 't',
description: 'optionally specify a path to a tarball already generated by NPM',
required: false,
}),
}

async run(): Promise<void> {
Expand Down
20 changes: 16 additions & 4 deletions src/commands/pack/win.ts
Expand Up @@ -203,10 +203,22 @@ export default class PackWin extends Command {
This command requires WINDOWS_SIGNING (prefixed with the name of your executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) to be set in the environment`

static flags = {
root: Flags.string({char: 'r', description: 'path to oclif CLI root', default: '.', required: true}),
'additional-cli': Flags.string({description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by "oclif pack:tarballs"`, hidden: true}),
tarball: Flags.string({char: 't', description: 'optionally specify a path to a tarball already generated by NPM', required: false}),
root: Flags.string({
char: 'r',
description: 'path to oclif CLI root',
default: '.',
required: true,
}),
'additional-cli': Flags.string({
description: `an Oclif CLI other than the one listed in config.bin that should be made available to the user
the CLI should already exist in a directory named after the CLI that is the root of the tarball produced by "oclif pack:tarballs"`,
hidden: true,
}),
tarball: Flags.string({
char: 't',
description: 'optionally specify a path to a tarball already generated by NPM',
required: false,
}),
}

async run(): Promise<void> {
Expand Down

0 comments on commit acd986d

Please sign in to comment.