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

feat: add install.ps1 for windows #1567

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

hunnywar
Copy link
Contributor

@hunnywar hunnywar commented Dec 25, 2024

feat: add install.ps1 for windows

Description

add install.ps1 for windows

  • This change requires a documentation update
  • I have made corresponding changes to the documentation

Related Issue(s)

Closes #1517

Screenshots

image

Notes

for testing purposes

powershell -c "irm https://raw.githubusercontent.com/hunnywar/daytona/ps-install/hack/install.ps1 | iex"

example in production

powershell -c "irm https://download.daytona.io/daytona/install.ps1 | iex"

Signed-off-by: hunnywar <h3815273@gmail.com>
@hunnywar hunnywar requested a review from a team as a code owner December 25, 2024 16:06
Signed-off-by: hunnywar <h3815273@gmail.com>
Signed-off-by: hunnywar <h3815273@gmail.com>
Signed-off-by: hunnywar <h3815273@gmail.com>
Signed-off-by: hunnywar <h3815273@gmail.com>
Signed-off-by: hunnywar <h3815273@gmail.com>
@Tpuljak Tpuljak requested a review from idagelic January 7, 2025 07:08
Copy link
Member

@idagelic idagelic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this out - works well.

Could you make sure that having a certain step fail terminates the execution of the script instead of it continuing on using ErrorAction

Another thing I noticed we should change is handling the creation of the install directory failing - another try catch, something like this:

# Create destination directory if it doesn't exist
try {
    if (!(Test-Path -Path $destination)) {
        Write-Host "Creating installation directory at $destination"
        New-Item -ItemType Directory -Force -Path $destination -ErrorAction Stop | Out-Null
    }
} catch {
    Write-Error "Failed to create installation directory: $_"
    exit 1
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Powershell script for install instead of direct command
2 participants