detect if the machine is already initialised

This commit is contained in:
Pavel Sviderski committed 2024-09-23 14:21:06 +10:00
1 parent 43e2bf86fb
commit d66818ea77
8 files changed
+180 -35

No files matched your search

-2
View File
@@ -19,8 +19,6 @@ type RemoteMachine struct {
// provisionMachine provisions the remote machine by downloading the Uncloud install script from GitHub and running it.
func provisionMachine(ctx context.Context, exec sshexec.Executor) error {
// TODO: Check if the machine is already provisioned and ask the user to reset it first.
user, err := exec.Run(ctx, "whoami")
if err != nil {
return fmt.Errorf("run whoami: %w", err)