Skip to content

Commit 6d4691a

Browse files
committed
fix: address PR 609 review feedback
1 parent 183f116 commit 6d4691a

File tree

11 files changed

+22
-19
lines changed

11 files changed

+22
-19
lines changed

cmd/agent/container/setup.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@ func (cmd *SetupContainerCmd) startContainerDaemon(
349349

350350
return command.StartBackgroundOnce(config2.BinaryName+".daemon", func() (*exec.Cmd, error) {
351351
logger.Debugf(
352-
"start devpod container daemon with inactivity timeout %s",
352+
"start %s container daemon with inactivity timeout %s",
353+
config2.BinaryName,
353354
workspaceInfo.ContainerTimeout,
354355
)
355356
binaryPath, err := os.Executable()

cmd/pro/provider/get/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (cmd *VersionCmd) Run(
6969
}
7070
providerID := os.Getenv(config.EnvProviderID)
7171
if providerID == "" {
72-
return fmt.Errorf("provider ID %s not defined", providerID)
72+
return fmt.Errorf("provider ID env var %s not defined", config.EnvProviderID)
7373
}
7474

7575
// get our own version

cmd/pro/provider/up.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (cmd *UpCmd) up(
112112
client client.Client,
113113
) error {
114114
options := platform.OptionsFromEnv(storagev1.DevPodFlagsUp)
115-
if options != nil && os.Getenv("DEBUG") == config.BoolTrue {
115+
if options != nil && os.Getenv(config.EnvDebug) == config.BoolTrue {
116116
options.Add("debug", config.BoolTrue)
117117
}
118118

desktop/src/components/useInstallCLI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export function useInstallCLI() {
116116
Adds the DevPod CLI to your <Code>$PATH</Code>.{" "}
117117
{isWindows ? (
118118
<>
119-
It will be placed in <Code>{`%APP_DATA%\\${FLATPAK_ID}\\bin`}</Code>
119+
It will be placed in <Code>{`%APPDATA%\\${FLATPAK_ID}\\bin`}</Code>
120120
</>
121121
) : (
122122
<>

desktop/src/views/Pro/Workspace/WorkspaceDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function PodStatus({ podStatus }: { podStatus: StorageV1DevPodWorkspaceInstanceP
439439
// check container status first
440440
const containerStatus = podStatus.containerStatuses?.find(
441441
(container) =>
442-
container.name === "devpod" &&
442+
container.name === CONTAINER_NAME &&
443443
(container.state?.waiting?.reason || container.state?.terminated?.reason)
444444
)
445445
if (containerStatus) {

desktop/src/views/Providers/AddProvider/SetupProviderSourceForm.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,9 @@ function mapCommunityProviderInfo(
559559
}
560560

561561
function stripDevpodPrefix(rawCommunityProvider: string): string {
562-
return rawCommunityProvider.replace(PROVIDER_PREFIX, "")
562+
return rawCommunityProvider.startsWith(PROVIDER_PREFIX)
563+
? rawCommunityProvider.slice(PROVIDER_PREFIX.length)
564+
: rawCommunityProvider
563565
}
564566

565567
function sortCommunityProviderInfo(a: TCommunityProviderInfo, b: TCommunityProviderInfo): number {

pkg/client/clientimplementation/workspace_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ func RunCommand(opts RunCommandOptions) error {
794794

795795
// Add debug env var if logger provided and in debug mode
796796
if opts.Log != nil && opts.Log.GetLevel() == logrus.DebugLevel {
797-
opts.Environ = append(opts.Environ, config.EnvDebug+"=true")
797+
opts.Environ = append(opts.Environ, config.EnvDebug+"="+config.BoolTrue)
798798
}
799799

800800
// use shell if command length is equal 1

pkg/driver/custom/custom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func (c *customDriver) runCommand(
318318

319319
// set debug level
320320
if log.GetLevel() == logrus.DebugLevel {
321-
environ = append(environ, pkgconfig.EnvDebug+"=true")
321+
environ = append(environ, pkgconfig.EnvDebug+"="+pkgconfig.BoolTrue)
322322
}
323323

324324
// run the command

pkg/gitsshsigning/helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func filterGpgSSHSection(lines []string) []string {
210210
var kept []string
211211
for _, line := range lines[1:] {
212212
trimmed := strings.TrimSpace(line)
213-
if !strings.HasPrefix(trimmed, "program = devpod-ssh-signature") {
213+
if !strings.HasPrefix(trimmed, "program = "+pkgconfig.SSHSignatureHelperName) {
214214
kept = append(kept, line)
215215
}
216216
}

pkg/loftconfig/config.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ func AuthDevpodCliToPlatform(config *client.Config, logger log.Logger) error {
2020
)
2121
out, err := cmd.CombinedOutput()
2222
if err != nil {
23-
logger.Debugf("Failed executing `devpod pro login`: %w, output: %s", err, out)
23+
logger.Debugf(
24+
"Failed executing `%s pro login`: %w, output: %s",
25+
pkgconfig.BinaryName,
26+
err,
27+
out,
28+
)
2429
return fmt.Errorf(
25-
"error executing 'devpod pro login' command: %w, access key: %v, host: %v",
30+
"error executing '%s pro login' command: %w, host: %v",
31+
pkgconfig.BinaryName,
2632
err,
27-
config.AccessKey,
2833
config.Host,
2934
)
3035
}

0 commit comments

Comments
 (0)