Skip to content

Commit

Permalink
small typo in message (#959)
Browse files Browse the repository at this point in the history
* typo in message

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>

* update variable name

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>

* don't set the workdir to the root

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>

* undo workdir changes

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
  • Loading branch information
rberrelleza committed Jun 26, 2020
1 parent 08bff6f commit c09bf69
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions cmd/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ func Run(namespace, devPath, language, workDir string, overwrite bool) error {
container = d.Spec.Template.Spec.Containers[0].Name
}

postfix := fmt.Sprintf("Analyzing deployment '%s'...", d.Name)
spinner := utils.NewSpinner(postfix)
suffix := fmt.Sprintf("Analyzing deployment '%s'...", d.Name)
spinner := utils.NewSpinner(suffix)
spinner.Start()
dev, err = initCMD.SetDevDefaultsFromDeployment(dev, d, container)
spinner.Stop()
Expand Down Expand Up @@ -257,7 +257,7 @@ func askForLanguage() (string, error) {
supportedLanguages := linguist.GetSupportedLanguages()
return askForOptions(
supportedLanguages,
"Couldn't detect any language in current folder. Pick your project's main language from the list below:",
"Couldn't detect any language in the current folder. Pick your project's main language from the list below:",
)
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ func Status() *cobra.Command {
}

func runWithWatch(ctx context.Context, dev *model.Dev, sy *syncthing.Syncthing) error {
postfix := "Synchronizing your files..."
spinner := utils.NewSpinner(postfix)
suffix := "Synchronizing your files..."
spinner := utils.NewSpinner(suffix)
pbScaling := 0.30
spinner.Start()
defer spinner.Stop()
Expand All @@ -108,7 +108,7 @@ func runWithWatch(ctx context.Context, dev *model.Dev, sy *syncthing.Syncthing)
if progress == 100 {
message = "Files synchronized"
} else {
message = utils.RenderProgressBar(postfix, progress, pbScaling)
message = utils.RenderProgressBar(suffix, progress, pbScaling)
}
spinner.Update(message)
time.Sleep(2 * time.Second)
Expand Down
8 changes: 4 additions & 4 deletions cmd/up/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,8 @@ func (up *upContext) startSyncthing(resetSyncthing bool) error {
}

func (up *upContext) synchronizeFiles() error {
postfix := "Synchronizing your files..."
spinner := utils.NewSpinner(postfix)
suffix := "Synchronizing your files..."
spinner := utils.NewSpinner(suffix)
pbScaling := 0.30

up.updateStateFile(synchronizing)
Expand All @@ -772,7 +772,7 @@ func (up *upContext) synchronizeFiles() error {
for c := range reporter {
if c > previous {
// todo: how to calculate how many characters can the line fit?
pb := utils.RenderProgressBar(postfix, c, pbScaling)
pb := utils.RenderProgressBar(suffix, c, pbScaling)
spinner.Update(pb)
previous = c
}
Expand All @@ -792,7 +792,7 @@ func (up *upContext) synchronizeFiles() error {
}

// render to 100
spinner.Update(utils.RenderProgressBar(postfix, 100, pbScaling))
spinner.Update(utils.RenderProgressBar(suffix, 100, pbScaling))

up.Sy.Type = "sendreceive"
up.Sy.IgnoreDelete = false
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/init/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func setWorkDirFromPod(ctx context.Context, dev *model.Dev, pod *apiv1.Pod, cont
log.Infof("error getting workdir of the deployment: %s", err)
workdir = "/okteto"
}

dev.WorkDir = workdir
return dev
}
Expand Down

0 comments on commit c09bf69

Please sign in to comment.