YehudaKremer / msix

Create Msix installer for flutter windows-build files.
https://pub.dev/packages/msix
MIT License
276 stars 68 forks source link

[BUG] msix:publish fails if runner is included in the path #211

Closed hayashikun closed 1 year ago

hayashikun commented 1 year ago

:information_source: Info

Version: v3.14.0

:speech_balloon: Description

I tried to msix:publish my app with GitHub self-hosted runner and it failed with the following error. GitHub self-hosted runner checkouts the repository under C:\actions-runner\_work\myapp.

The build folder path is reconstructed in Configuration#_getBuildFilesFolder, and unfortunately, the build folder path is broken, I guess.

Unhandled exception:
Build files not found at C:\actions-\runner\_work\myapp\myapp\build\windows\runner\Release, first run "flutter build windows" then try again
#0      Configuration.validateWindowsBuildFiles (package:msix/src/configuration.dart:288:7)
<asynchronous suspension>
#1      Msix._buildMsixFiles (package:msix/msix.dart:111:5)
<asynchronous suspension>
#2      Msix._createMsix (package:msix/msix.dart:102:5)
<asynchronous suspension>
#3      Msix.publish (package:msix/msix.dart:70:5)
<asynchronous suspension>
#4      main (file:///C:/Users/r_hayashi/AppData/Local/Pub/Cache/hosted/pub.dev/msix-3.[15](https://github.com/hayashikun/myapp/actions/runs/-/jobs/-#step:9:16).0/bin/publish.dart:4:3)
<asynchronous suspension>

:scroll: Pubspec.yaml

msix_config:
  msix_version: 1.0.0
  display_name: myapp
  publisher_display_name: hayashikun
  identity_name: com.hayashikun.myapp
  capabilities: internetClient, microphone
  certificate_path: certificate.pfx
  certificate_password: ''
  install_certificate: false
  windows_build_args: --dart-define-from-file=env/dev.json
  logo_path: logo.png
  trim_logo: false
  protocol_activation: myapp
  app_installer:
    publish_folder_path: ./build/publish/dev-1.0.0
    hours_between_update_checks: 0
    automatic_background_task: true
    update_blocks_activation: true
    show_prompt: true
    force_update_from_any_version: false
YehudaKremer commented 1 year ago

Hello @hayashikun

Thanks for the bug report and the PR fix 👍 I publish new version (3.15.1) with your fix.