Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 08 01:16
    SMTStuck opened #972
  • Aug 05 04:34
    RickStrahl commented #971
  • Aug 04 22:12
    madmax1242 opened #971
  • Aug 02 22:35
    RickStrahl closed #970
  • Aug 02 22:35
    RickStrahl commented #970
  • Aug 02 21:05
    msd reopened #970
  • Aug 02 21:05
    msd closed #970
  • Aug 02 21:05
    msd commented #970
  • Aug 02 18:14
    msd opened #970
  • Jul 19 16:52
    RickStrahl closed #969
  • Jul 18 17:59

    RickStrahl on main

    Update Changelog.md (compare)

  • Jul 15 22:37
    RickStrahl commented #969
  • Jul 15 22:18
    RickStrahl labeled #969
  • Jul 15 22:18
    RickStrahl assigned #969
  • Jul 14 09:51
    rowtoripo opened #969
  • Jul 13 22:32
    RickStrahl closed #968
  • Jul 13 22:32
    RickStrahl commented #968
  • Jul 12 17:47
    GregFuhrmanTT commented #968
  • Jul 12 16:20
    RickStrahl commented #968
  • Jul 12 16:18
    RickStrahl commented #968
Gary Ewan Park
@gep13
If the literally have nothing in the chocolateyinstall.ps1 file, then simply omit that
Rick Strahl
@RickStrahl
FWIW, I haven't been able to find the docs on any of this. It may be there but I can't find the docs for an embedded install.
Gary Ewan Park
@gep13
:point_up:
@RickStrahl see my comment in the issue :-)
Rick Strahl
@RickStrahl
Not that it matters so much now :-)
Rick Strahl
@RickStrahl
So, there's nothing much left of my build script now that I don't need all these files:
# Script builds a Chocolatey Package and tests it locally
# 
#  Assumes: Uses latest release out of Pre-release folder
#           Release has been checked in to GitHub Repo
#   Builds: ChocolateyInstall.ps1 file with download URL and sha256 embedded

cd "$PSScriptRoot" 

remove-item ".\tools" -recurse -force

# $sourceFolder = "..\Distribution" 
# $file = "$sourceFolder\MarkdownMonster.exe"
# write-host $file

# $sha = get-filehash -path "$file" -Algorithm SHA256  | select -ExpandProperty "Hash"
# write-host $sha

robocopy $sourceFolder .\tools /MIR
copy ..\license.txt .\tools\license.txt

#empty install file - we just have content no code
#$filetext = ""
#out-file -filepath .\tools\chocolateyinstall.ps1 -inputobject $filetext

# uninstall script
# copy chocolateyuninstall.ps1 .\tools

#$filetext = @"
#MarkdownMonster.exe
#Sha256: $sha
#"@
# out-file -filepath .\tools\verify.txt -inputobject $filetext

del *.nupkg

# Create .nupkg from .nuspec
choco pack

choco uninstall "MarkdownMonster.Portable"

choco install "MarkdownMonster.Portable" -fdv -y  -s ".\"
Thanks for your help.
As a nice side effect I looked a lot closer at running the portable version and found a few more little things that weren't working right that got fixed (like missing icons) and a few other UI quiks.
:+1:
Gary Ewan Park
@gep13
you know, if you wanted, you could embed the exe into this package as well: https://chocolatey.org/packages/MarkdownMonster rather than first downloading it as well, that would also save the need for the checksums :-D
Rick Strahl
@RickStrahl
So I pushed it up markdownmonster.portable
It looks like it made it but choco push is totally hung.
I remember this happened with the previous version as well. Console is dead I have to shut it down.
blob
eventually returned. It says it's timed out, but the package is up on choco.
Rick Strahl
@RickStrahl
The checksums aren't a big problem since those are auto-generated as part of the build process and embedded into the choco script. Main thing I don't like is that the upload takes a while and apparently hangs a lot of the time.
Rick Strahl
@RickStrahl
Hmmm... so looks like the uninstall isn't working:
blob
Gary Ewan Park
@gep13
hmm, that looks like a question for @ferventcoder
any ideas Rob?
Rick Strahl
@RickStrahl
Looks like the uninstall is looking in some odd folders for uninstall. There's no uninstall.ps1 (or install for that matter).
The question is why is it looking in the lib-bkp folder.
Gary Ewan Park
@gep13
during the uninstallation process, Chocolatey moves items into that folder, so that if something goes wrong, it can recover the installation.
Rob Reynolds
@ferventcoder

:point_up: January 15, 2017 3:34 AM

Yip, if it is an embedded package, with just contents, Chocolatey will wipe out the folder on uninstallation

Chocolatey is a tad bit smarter than that. On uninstall it removes all unchanged files and leaves files that have changed. If you uninstall with force, it will wipe all files, including files created and user changed files. Same goes for upgrade.

@RickStrahl @gep13 chocolatey/choco#1139 for the uninstall issue - it looks like something was running and locking the folder, so when it moves the files to lib-bkp and later attempts to delete them, it fails because the locked files are now there.
Rob Reynolds
@ferventcoder
It should not cause a failure, only warnings. However it looks like in this case it may not have had the ability to create the copies back in the actual lib directory so it considered it a failure.
:point_up: January 15, 2017 4:26 AM for the push hang. I push up 7MB and don't run into this very often. Let me see if maintenance can clear this up.
Rob Reynolds
@ferventcoder
@RickStrahl I just performed maintenance on Chocolatey.org. It's coming back up now. I'd be curious to know if you are still running into hangups after this.
Rick Strahl
@RickStrahl
@ferventcoder Yeah I saw the error message, but I checked and I made sure there was nothing running or any explorer folders open in the folder structure which made that puzzling.
@ferventcoder I did run from a local folder install for testing though - not sure if that would make a difference. I give it another try now after reboot.
Rick Strahl
@RickStrahl
@ferventcoder So I tried a few things here and I notice that everything works from an elevated command prompt. But from a non elevated prompt it doesn't work. Left unelevated, right elevated.
blob
This is a portable install and shouldn't need any admin rights to install. No admin tag in the nuspec.
@ferventcoder @gep13 Shouldn't I be able to install from a non-elevated prompt with this portable install?
Rob Reynolds
@ferventcoder
If you have installed choco to a directory other than the default, then yes
The default installation directory is locked down to admins only with modify access
we highlight that in the more options section oh the install page. Also on the security page
Rick Strahl
@RickStrahl
@ferventcoder So then what's the point of a portable install if you still require admin? Shouldn't choco install in a location that doesn't require admin rights?
Rick Strahl
@RickStrahl
@ferventcoder Ok, fair enough. I was under the impression that Chocolatey could run under limited rights, because that's what several people were asking for. So when I don't specify Admin rights on the installer does it run the installer under Admin as well or under user account? I thought this was the whole point of a portable, non-admin capable install.
We probably should move this over to @chocolate.org group :-)
Rob Reynolds
@ferventcoder
Chocolatey can run under limited rights. By default it does not due to more secure by default settings
Rick Strahl
@RickStrahl
@gep13 BTW, you can now do:
---
Title: @Model.ActiveDocument.Title
Published: @DateTime.Now.ToString("yyy-MM-dd")
Tags: 
- ~
---
In 1.1.20 of Markdown Monster. No more @Razor code block required to figure out the file name.
That feature needs a little more work - like it should also capture a title from FrontMatter.
Gary Ewan Park
@gep13
@RickStrahl sweet!
will give that a try as well
hmm, when I try the above, I get...