stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.94k stars 782 forks source link

[Bug Report] develop missing configLocation (error writing configuration) #4908

Closed feederbox826 closed 4 months ago

feederbox826 commented 4 months ago

Describe the bug The current development branch docker image (9a7f83056a1085e0a5143ad150832ae54062dbfa27518bec27633b363e7c178c) fails during setup

To Reproduce Steps to reproduce the behavior:

  1. Delete config folder
  2. walk through /setup wizard

Issue and fixes

in develop, the configLocation variable in the mutation Setup GQL query is not initialized correctly

For comparison, here are the configLocation variable values in the mutationSetup calls, everything else is identical and works perfectly fine, will include it below to be complete

development v0.25.1
/root/.stash $PWD /root/.stash $PWD
"" "config.yml" "/root.stash/config.yml" "config.yml"
ENOENT ENOENT

When initialized "properly" with /root/.stash/config.yml results are as-expected

Appendix

[1] mutation Setup (latest, /root/.stash)

{
  "operationName": "Setup",
  "variables": {
    "input": {
      "configLocation": "/root/.stash/config.yml",
      "databaseFile": "",
      "generatedLocation": "",
      "cacheLocation": "",
      "storeBlobsInDatabase": false,
      "blobsLocation": "",
      "stashes": [
        {
          "path": "/media/stash",
          "excludeVideo": false,
          "excludeImage": false
        }
      ]
    }
  },
  "query": "mutation Setup($input: SetupInput!) {\n  setup(input: $input)\n}"
}
feederbox826 commented 4 months ago

Confirming that the fix worked, it no longer prompts for location and creates the default config successfully