Closed flammable closed 8 years ago
Hi @flammable! Did you run recipe-robot --config
yet? If not, do that in order to set your preferences, then run the app through again. If all else fails, do defaults write com.elliotjordan.recipe-robot RecipeCreateLocation "/Users/$USER/Library/AutoPkg/Recipe Robot Output"
and try again.
@sheagcraig, I wonder what would cause the RecipeCreateLocation
key to be missing from prefs. Looking through get_recipe_creation_location()
now to see if anything obvious emerges.
Ooh, I should have specified - I'm using the GUI version. Many thanks for the AutoPkg recipe! :)
Although I set those preferences at first launch, I guess they didn't fully save. Here's what my preferences file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Initialized</key>
<true/>
<key>LastRecipeRobotVersion</key>
<string>1.0</string>
<key>RecipeCreateCount</key>
<integer>0</integer>
<key>RecipeIdentifierPrefix</key>
<string>com.github.flammable</string>
<key>RecipeTypes</key>
<array>
<string>download</string>
<string>munki</string>
</array>
</dict>
</plist>
I used the defaults command to set RecipeCreateLocation, and now I'm successfully creating recipes! This is awesome!
@eahrold, could there be an issue initializing RecipeCreateLocation because of the question mark in this line? https://github.com/homebysix/recipe-robot/blob/master/app/Recipe%20Robot/Defaults.swift#L56
I don't know if it makes a difference, but I didn't click the "Choose..." button to select a folder - I was happy with using the default. I initially thought it was an issue because the folder doesn't exist prior to running the app, so I made it myself - but it still produced the same error because it wasn't set in the preferences file.
I thought this may happen. In the App we're simply doing an NSUserDefaults registerDefaults which doesn't write to the preference file. This is yet another thing that should resolve itself if we move the script to querying to the defaults system. But I'll put up a temp fix.
@eahrold Is this as simple as subprocessing to defaults write
instead of writing the plist to a file? I can probably handle that.
Let me take a stab at this with pyobjc NSUserDefaults.
On Nov 25, 2015, at 12:21 PM, Elliot Jordan notifications@github.com wrote:
@eahrold Is this as simple as subprocessing to defaults write instead of writing the plist to a file? I can probably handle that.
— Reply to this email directly or view it on GitHub.
I'm having this error as well… was there an established fix for this elsewhere?
ETA: saw the defaults write above and tried it, we'll see how it goes…
@smashism Looks like Eldon made some updates in this branch. I'll review and merge them when I get some time.
@smashism and @flammable, give v1.0.1 a try: https://github.com/homebysix/recipe-robot/releases/latest
Thanks, @homebysix! I'll give it a try on a fresh computer once the holidays are over (probably early next week).
Also, thanks to @eahrold, too. :smile:
I'm super late on this, but just checked - 1.0.1 seems to fix the problem. Thanks!
Hey Elliot! Thanks for this - I'm really excited to use it!
I just tried my first app, though, and I'm getting this Python error in the output:
I tried manually creating the folder ~/Library/AutoPkg/Recipe Robot Output/, but no luck. What am I doing wrong?
I'm running OS X 10.11.1 - let me know if you need any more details. Thanks!
Mike