Skip to content

notepads-np: Installation process stuck in post_install script #430

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

Open
AkariiinMKII opened this issue Apr 1, 2025 · 0 comments · May be fixed by #431
Open

notepads-np: Installation process stuck in post_install script #430

AkariiinMKII opened this issue Apr 1, 2025 · 0 comments · May be fixed by #431
Labels
bug Something isn't working

Comments

@AkariiinMKII
Copy link
Contributor

Bug Report

Package Name: notepads-np

Current Behaviour

Installation process stuck in post_install script

Expected Behaviour

Complete script in seconds

Additional context/output

Add debug process in post_install script

{
    "post_install": [
        "$package_name = (Get-AppxPackage -Name '*JackieLiu*Notepads*').PackageFamilyName",
        "debug $package_name",
        "while (-not (Test-Path \"$env:LOCALAPPDATA\\Packages\\$package_name\\Settings\\settings.dat\")) { Start-Sleep -Milliseconds 250 }",
        "Copy-Item -Recurse -Force \"$dir\\Settings\" -Destination \"$env:LOCALAPPDATA\\Packages\\$package_name\""
    ]
}

Installation returns

> gsudo scoop install notepads-np
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Installing 'notepads-np' (1.5.6.0) [64bit] from 'nonportable' bucket
Loading Notepads_1.5.6.0_x86_x64_arm64.msixbundle from cache.
Checking hash of Notepads_1.5.6.0_x86_x64_arm64.msixbundle ... ok.
Running installer script...done.
Linking ~\scoop\apps\notepads-np\current => ~\scoop\apps\notepads-np\1.5.6.0
Persisting Settings
Running post_install script...DEBUG[1743511022.42881] $package_name = $null -> :2:1

Seems $package_name hasn't got the correct value

Possible Solution

One more try for null $package_name

{
    "post_install": [
        "while ($null -eq $package_name) {",
        "    Start-Sleep -Milliseconds 250",
        "    $package_name = (Get-AppxPackage -Name '*JackieLiu*Notepads*').PackageFamilyName",
        "}",
        "while (-not (Test-Path \"$env:LOCALAPPDATA\\Packages\\$package_name\\Settings\\settings.dat\")) { Start-Sleep -Milliseconds 250 }",
        "Copy-Item -Recurse -Force \"$dir\\Settings\" -Destination \"$env:LOCALAPPDATA\\Packages\\$package_name\""
    ]
}

System details

Windows version: 11

OS architecture: 64bit

PowerShell version: 5.1.26100.3585

Additional software: gsudo

Scoop Configuration

{
    "aria2-enabled":  true,
    "aria2-max-connection-per-server":  16,
    "aria2-split":  16,
    "aria2-min-split-size":  "1M",
    "last_update":  "2025-04-01T11:32:20.2477208+08:00",
    "scoop_branch":  "master",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop",
    "debug":  true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant