Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/aliyun-poc-fc-gpu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 0.0.1
provider:
name: aliyun
region: cn-chengdu
region: cn-hangzhou

vars:
testv: testVarValue
Expand Down
4 changes: 2 additions & 2 deletions src/commands/destroy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { constructActionContext, logger, rosStackDelete } from '../common';

export const destroyStack = async (stackName: string) => {
const context = constructActionContext({ stackName });
export const destroyStack = async (stackName: string, options: { location: string }) => {
const context = constructActionContext({ stackName, ...options });
logger.info(`Destroying stack ${stackName}...`);
await rosStackDelete(context);
};
5 changes: 3 additions & 2 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ program

program
.command('destroy <stackName>')
.option('-f, --file <path>', 'specify the yaml file')
.description('destroy serverless stack')
.action(async (stackName) => {
await destroyStack(stackName);
.action(async (stackName, { file }) => {
await destroyStack(stackName, { location: file });
});

program.parse();