Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wmill cli flow push - avoid hardcoded suffix #4967

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
wmill cli flow push - avoid hardcoded suffix
File path shall be file as denoted in cli docs.  Hardcoded suffix
counter productive.
  • Loading branch information
cherusk committed Dec 22, 2024
commit 3aaecff7d2b23e7e61a9c5fbbd21b3a4d69914e7
7 changes: 6 additions & 1 deletion cli/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ export async function pushFlow(
if (!localPath.endsWith(SEP)) {
localPath += SEP;
}
const localFlow = (await yamlParseFile(localPath + "flow.yaml")) as FlowFile;

if (!localPath.endsWith("yaml") || !localPath.endsWith("yml")) {
localPath += "flow.yaml";
}

const localFlow = (await yamlParseFile(localPath)) as FlowFile;

replaceInlineScripts(localFlow.value.modules, localPath, undefined);

Expand Down