-
Notifications
You must be signed in to change notification settings - Fork 863
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: persist default provider deletion (#1288)
Signed-off-by: Ivan Dagelic <[email protected]>
- Loading branch information
Showing
5 changed files
with
122 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2024 Daytona Platforms Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package manager | ||
|
||
import "fmt" | ||
|
||
func IsProviderAlreadyDownloaded(err error, name string) bool { | ||
return err.Error() == providerAlreadyDownloadedError(name).Error() | ||
} | ||
|
||
func IsNoPluginFound(err error, dir string) bool { | ||
return err.Error() == noPluginFoundError(dir).Error() | ||
} | ||
|
||
func providerAlreadyDownloadedError(name string) error { | ||
return fmt.Errorf("provider %s already installed", name) | ||
} | ||
|
||
func noPluginFoundError(dir string) error { | ||
return fmt.Errorf("no plugin found in %s", dir) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters