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

updated error messages #945

Merged
merged 1 commit into from Jun 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/up/up.go
Expand Up @@ -723,15 +723,15 @@ func (up *upContext) startSyncthing(resetSyncthing bool) error {
if up.Dev.PersistentVolumeEnabled() {
if userID != -1 && userID != *up.Dev.SecurityContext.RunAsUser {
return errors.UserError{
E: fmt.Errorf("Folder '%s' is not writable by user %d", up.Dev.MountPath, userID),
Hint: fmt.Sprintf("Set 'securityContext.runAsUser: %d' in your okteto manifest\n After that, run 'okteto down -v' to reset the synchronization service and try 'okteto up' again", userID),
E: fmt.Errorf("User %d doesn't have write permissions for the %s directory", userID, up.Dev.MountPath),
Hint: fmt.Sprintf("Set 'securityContext.runAsUser: %d' in your okteto manifest\n After that, run 'okteto down -v' to reset the synchronization service and run 'okteto up' again", userID),
}
}
} else {
if pods.OktetoFolderINotWritable(up.Context, up.Dev, up.Client) {
return errors.UserError{
E: fmt.Errorf("Folder '%s' is not writable by user %d", up.Dev.MountPath, userID),
Hint: fmt.Sprintf("Give the user %d write privileges to '%s' in your development image\n Alternatively, enable 'persistentVolume.enabled: true' in your okteto manifest\n After that, try 'okteto up' again", userID, up.Dev.MountPath),
E: fmt.Errorf("User %d doesn't have write permissions for the %s directory", userID, up.Dev.MountPath),
Hint: fmt.Sprintf("Update your development image to grant user %d write permissions to %s\n Alternatively, enable 'persistentVolume.enabled: true' in your okteto manifest\n After that, run 'okteto up' again", userID, up.Dev.MountPath),
}
}
}
Expand Down