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

Cannot load config with missing apps #45

Closed
silver886 opened this issue Sep 12, 2023 · 2 comments
Closed

Cannot load config with missing apps #45

silver886 opened this issue Sep 12, 2023 · 2 comments

Comments

@silver886
Copy link

My config has some apps that is not supplied.
And there are also some apps in the config but not installed.

And I got the following log with exit code 2.

> lporg load --no-backup --yes --verbose --config /var/folders/_y/n7114yk15ll_0yps6s3j_v140000gn/T/tmp.3ZyR2YXw/launchpad.yaml

                                          '.:/+ooossoo+/:-'
                                     ':+ydNMMMMMMMMMMMMMMMNmyo:'
                                   '.--.''.:ohNMMMMMMMMNho:.''..'
                                        -o+.  ':sNMMms-'  .--
                                 '+o     .mNo    '::'   :dNh'    '+-
                                :mMo      dMM-         .NMMs      hNs
                               -NMMNs:--/hMMM+         .MMMNo-''-sMMMs
                          -'   sMMMMMMNNMMMMM:          hMMMMNNNNMMMMN
                         -y    /MMMMMMMMMMMNs           .mMMMMMMMMMMMd     :
                        .mN.    oNMMMMMMMms-             .yNMMMMMMMNy.    -N:
                        hMMm+'   ./syys+-'    -//   ':/-   ./syyys/.    'oNMm'
                       /MMMMMms:.              '.    '''             ./ymMMMMs
                       mMMMMMMMMNo                 '               'sNMMMMMMMN.
                      -MMMMMMMMN+'             :shmmmh+.            'oNMMMMMMMo
                      /MMMMMMMd-             :dds+///sdm/             :mMMMMMMm
                      sMMMMMMd.             :m+'      ':hs'            -mMMMMMM+
                    .hMMMMMMM-             :h:'         'oh.            /MMMMMMN/
                   /mMMMMMMMN'           ./+' .://:::::.  /d/           .MMMMMMMN/
                 'sMMMMMMMMMM/       '.-:-'     '....'     .so-'        oMMMMMMMMN:
                .hMMMMMMMMMMMNs-'     ''                     '--     '-yNMMMMMMMMMN-
               -dMMMMMMMMMMMMMMNs'                                  'yNMMMMMMMMMMMMm.
              -mMMMMMMMMMMMMMMNo'                                    'sMMMMMMMMMMMMMd'
             :NMMMMMMMMMMMMMMm:                                        /NMMMMMMMMMMMMy
            -NMMMMMMMMMMMMMMd.                                        ' -mMMMMMMMMMMMMo
           .mMMMMMMMMMMMMMMd-/o'                                      .o::mMMMMMMMMMMMN/
          'dMMMMMMMMMMMMMMMhmm.                                        -mdhMMMMMMMMMMMMm.
          yMMMMMMMMMMMMMMMMMN-                                          :NMMMMMMMMMMMMMMh
         /MMMMMMMMMMMMMMMMMN:                                            +MMMMMMMMMMMMMMM+
        'mMMMMMMMMMMMMMMMMMo                                              sMMMMMMMMMMMMMMN.
        oMMMMMMMMMMMMMMMMMh                                               'dMMMMMMMMMMMMMMy
       'mMMMMMMMMMMMMMMMMN.                                                :MMMMMMMMMMMMMMM-
       :MMMMMMMMMMMMMMMMMo                                                  yMMMMMMMMMMMMMMy
       sMMMMMMMMMMMMMMMMN'                                                  -MMMMMMMMMMMMMMN'
       dMMMMMMMMMMMMMMMMh                                                    mMMMMMMMMMMMMMM-
       mMMMMMMMMMMMMMMMMo                                                    yMMMMMMMMMMMMMM-
       mMMMMMMMMMMMMMMMMo                                                    sMMMMMMMMMMMMMM.
       hMMMMMMMMMMMMMMMMs                                                    hMMMMMMMMMMMMMN
       oMMMMMMMMMMMMMMMMy                                                    dMMMMMMMMMMMMMy
       .MMMMMMMMMMMMMMMMd                                                    NMMMMMMMMMMMMM-
        yMMMMMMMMMMMMMMMM'                                                  .MMMMMMMMMMMMMh
        .NMMMMMMMMMMMMMMM/                                                  oMMMMMMMMMMMMN-
         :NMMMMMMMMMMMMMMh                                                  mMMMMMMMMMMMMo
          /NMMMMMMMMMMMMMM-                                                /MMMMMMMMMMMMd'
           :NMMMMMMMMMMMMMh                                               'mMMMMMMMMMMMm.
            .hMMMMMMMMMMMMM/                                              oMMMMMMMMMMMN-
              +mMMMMMMMMMMMN-                                            :MMMMMMMMMMMm-
               'oNMMMMMMMMMMm.                                          -NMMMMMMMMMMd-
                 .omNmh+:hNMMm-                                        :NNsmMMMMMMMy'
                   '.     -smMN+                                     'oNh- 'sNMMNh:
                            ':yNh-                                  -hh:     .:-'
                               ':o/'                              '/+.
                                   '                              '


   • using config file: /var/folders/_y/n7114yk15ll_0yps6s3j_v140000gn/T/tmp.3ZyR2YXw/launchpad.yaml
   • Loading launchpad settings
      • parsing launchpad config YAML path=/var/folders/_y/n7114yk15ll_0yps6s3j_v140000gn/T/tmp.3ZyR2YXw/launchpad.yaml
   • PARSE LAUCHPAD DATABASE
      • found launchpad database  database=/var/folders/_y/n7114yk15ll_0yps6s3j_v140000gn/0/com.apple.dock.launchpad/db/db
         • removed old DB file       path=/var/folders/_y/n7114yk15ll_0yps6s3j_v140000gn/0/com.apple.dock.launchpad/db/db
         • removed old DB file       path=/var/folders/_y/n7114yk15ll_0yps6s3j_v140000gn/0/com.apple.dock.launchpad/db/db-shm
         • removed old DB file       path=/var/folders/_y/n7114yk15ll_0yps6s3j_v140000gn/0/com.apple.dock.launchpad/db/db-wal
      • restarting Dock
      • clear out groups
      • disabling SQL update triggers
      • add root and holding pages
         • found installed apps that are not in supplied config app=...
         • found installed apps that are not in supplied config app=...
         • found installed apps that are not in supplied config app=...
         • found installed apps that are not in supplied config app=...
         • found installed apps that are not in supplied config app=...
         • found app in config that are is not on system app=...
         • found app in config that are is not on system app=...
         • found app in config that are is not on system app=...
         • found app in config that are is not on system app=...
         • found app in config that are is not on system app=...
         • found app in config that are is not on system app=...
panic: runtime error: slice bounds out of range [6:5]

goroutine 1 [running]:
github.com/blacktop/lporg/internal/database.(*LaunchPad).GetMissing(0xc000179ae0, 0xc000179b08, 0xc000274080?)
	github.com/blacktop/lporg/internal/database/database.go:99 +0x10e7
github.com/blacktop/lporg/internal/command.LoadConfig(0xc000179ca8)
	github.com/blacktop/lporg/internal/command/command.go:514 +0x90b
github.com/blacktop/lporg/cmd.glob..func2(0x19b3320, {0xc0001fa730?, 0x4?, 0x1594aa2?})
	github.com/blacktop/lporg/cmd/load.go:101 +0x511
github.com/spf13/cobra.(*Command).execute(0x19b3320, {0xc0001fa6e0, 0x5, 0x5})
	github.com/spf13/cobra@v1.7.0/command.go:940 +0x87c
github.com/spf13/cobra.(*Command).ExecuteC(0x19b38e0)
	github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.7.0/command.go:992
github.com/blacktop/lporg/cmd.Execute()
	github.com/blacktop/lporg/cmd/root.go:61 +0x1a
main.main()
	github.com/blacktop/lporg/main.go:27 +0xf

I tested with some versions, and here is the result.
macOS: 12.6.8 (21G725)
lporg:

  • 20.4.25: failed
  • 20.4.24: failed
  • 20.4.23: passed
  • 20.4.22: passed
@GenkaOk
Copy link
Contributor

GenkaOk commented Sep 14, 2023

A similar problem
Many applications are installed on the macbook, but not installed on the mac mini and this causes panic

@blacktop
Copy link
Owner

please try latest

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

No branches or pull requests

3 participants