Skip to content

Commit

Permalink
refactor cli
Browse files Browse the repository at this point in the history
  • Loading branch information
tasshi-me committed Oct 28, 2024
1 parent 1a9cd24 commit bb847d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cli/plugin/pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const handler = async (args: Args) => {
emitExperimentalWarning("This feature is under early development");
const flags = {
ppk: args["private-key"],
out: args.output,
output: args.output,
watch: args.watch,
};
if (process.env.NODE_ENV === "test") {
Expand Down
6 changes: 3 additions & 3 deletions src/plugin/packer/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ManifestFactory, PluginZip, PrivateKey, LocalFSDriver } from "../core";

type Options = Partial<{
ppk: string;
out: string;
output: string;
watch: boolean;
}>;

Expand Down Expand Up @@ -68,8 +68,8 @@ export const run = async (pluginDir: string, options_?: Options) => {
// 6. prepare output directory
let outputDir = path.dirname(path.resolve(pluginDir));
let outputFile = path.join(outputDir, "plugin.zip");
if (options.out) {
outputFile = options.out;
if (options.output) {
outputFile = options.output;
outputDir = path.dirname(path.resolve(outputFile));
}
await fs.mkdir(outputDir, { recursive: true });
Expand Down

0 comments on commit bb847d3

Please sign in to comment.