Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

(fix) Delete App by path #169

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

Merged
giulio93 merged 1 commit into main from fix_delete_app_by_path
Dec 19, 2025
Merged
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
12 changes: 3 additions & 9 deletions internal/orchestrator/orchestrator.go
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -897,15 +897,9 @@ func CloneApp(

func DeleteApp(ctx context.Context, dockerClient command.Cli, app app.ArduinoApp) error {

runningApp, err := getRunningApp(ctx, dockerClient.Client())
if err != nil {
return err
}
if runningApp != nil && runningApp.FullPath.EqualsTo(app.FullPath) {
// We try to remove docker related resources at best effort
for range StopAndDestroyApp(ctx, dockerClient, app) {
// just consume the iterator
}
// We try to remove docker related resources at best effort
for range StopAndDestroyApp(ctx, dockerClient, app) {
Copy link
Contributor

@lucarin91 lucarin91 Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if we by default we should return an error if the app is running or if it has some data, and maybe have a parameter to force this behaviour

Copy link
Contributor

@mirkoCrobu mirkoCrobu Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering whether it would be useful to add a parameter to make the command more customizable.
Then I thought: "But in this case, we would need to modify both the CLI and the API."
Looking at the code, I just realized that we don't have a CLI command for app deletion!
I am going to open an issue for that.

Copy link
Contributor

@lucarin91 lucarin91 Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already done here #170

mirkoCrobu reacted with heart emoji
// just consume the iterator
}

return app.FullPath.RemoveAll()
Expand Down

AltStyle によって変換されたページ (->オリジナル) /