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

tkn pac generate -f fail when directory is not there #1849

Open
chmouel opened this issue Dec 5, 2024 · 4 comments · May be fixed by #1983
Open

tkn pac generate -f fail when directory is not there #1849

chmouel opened this issue Dec 5, 2024 · 4 comments · May be fixed by #1983
Assignees
Labels
bug Something isn't working cli

Comments

@chmouel
Copy link
Member

chmouel commented Dec 5, 2024

% tkn pac generate --overwrite --branch main --event-type pull_request -f .tekton/another.yaml
Error: cannot write template to .tekton/another.yaml: open .tekton/another.yaml: no such file or directory

probably should mkdirAll the dirname of the file

@chmouel chmouel added bug Something isn't working cli labels Dec 5, 2024
@zakisk
Copy link
Contributor

zakisk commented Mar 6, 2025

@chmouel if .tekton/another.yaml is not present then do you want to create it?

@chmouel
Copy link
Member Author

chmouel commented Mar 6, 2025

yes

@chmouel
Copy link
Member Author

chmouel commented Mar 6, 2025

needs just a os.Makedirs

@PuneetPunamiya
Copy link
Contributor

/assign

PuneetPunamiya added a commit to PuneetPunamiya/pipelines-as-code that referenced this issue Mar 7, 2025
Before this patch when .tekton directory is not there and if user runs
`tkn pac generate -f` command then it used to return an error

Now with this patch if .tekton directory is not there and the command is
executed then directory is created and it generates the pipelinerun yaml
based on the name provided by the user

Fixes: openshift-pipelines#1849

Signed-off-by: PuneetPunamiya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
3 participants