Coder Social home page Coder Social logo

posh-gvm's Introduction

The code inside of this repository is broken. If you need the functionality of SDKMAN on Windows consider using Docker or WSL.

posh-gvm's People

Contributors

bungard avatar marcianoskate avatar obourgeoispro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

posh-gvm's Issues

Command `gvm flush candidate` totally breaks application

gvm flush candidate removes file candidates.txt from .meta folder.

After that any other command returns error:

in Utils.ps1:341 char:9

  •     throw 'Can not retrieve list of candidates'
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Can not retrieve list of candidates:String) [], RuntimeException
    • FullyQualifiedErrorId : Can not retrieve list of candidates

posh-gvm install error

When i installed posh-gvm, i got following info:

(new-object Net.WebClient).DownloadString('https://raw.githubusercontent.com/flofreud/posh-gvm/master/GetPoshGvm.ps1') | iex
Downloading posh-gvm from https://github.com/flofreud/posh-gvm/archive/master.z
ip
posh-gvm installed!
Please see https://github.com/flofreud/posh-gvm#usage for details to get starte
d.
WARN: Execute 'Import-Module posh-gvm -Force' so changes take effect!

Then i execute 'Import-Module posh-gvm -Force',
Test-Path : Illegal character in the path

+         if ( !( Test-Path "$Global:PGVM_DIR\$candidate" ) ) {
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (C:\Users\John\.p...ransitional\ 
   EN":String) [Test-Path],ArgumentException
    + FullyQualifiedErrorId : ItemExistsArgumentError,Microsoft.PowerShell.Com 
   mands.TestPathCommand

I did a lot search, but got nothing useful.

Error "Could not unzip the archive of" for kotlin 1.0.3+ and sbt 0.13.11

Utils.ps1 fails here:

if ( !(Test-Path "$Script:PGVM_TEMP_PATH\*-$Version") ) {
        throw "Could not unzip the archive of $Candidate $Version. Please delete archive from $Script:PGVM_ARCHIVES_PATH (or delete all with 'gvm flush archives'"
}

Because sbt and kotlin archives don't have version numbers in inner folders. Moreover, kotlin's folder name is "kotlinc".

Install fails: "This command is not available in offline mode."

We've gotten this to install successfully on several computers, but we have one that stubbornly refuses to work.

Using the Short Script installation method, when we get to step 2, we get,

This command is not available in offline mode.
At C:\Users\...\Documents\WindowsPowerShell\Modules\posh-gvm\Utils.ps1:294 char:14
...

The system is connected to the Internet and the firewall is off. We can run ping google.com in the same PowerShell session just fine, etc.

Any suggestions?

Exception calling "GetResponse" with "0" argument(s): "The operation has timed out"

Hello I am getting this error when I send this command "gvm install groovy" - I have installed PsGet, posh-gvm, PsUrl, in my powershell ".ps1" directory:

Exception calling "GetResponse" with "0" argument(s): "The operation has timed out"
At C:\Users\jdsmith\Documents\WindowsPowerShell\Modules\posh-gvm\Utils.ps1:432 char:5

  • $response = $request.GetResponse()
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : WebException

posh-gvm

Exception while calling "GetResponse" in Utils.ps1

First of all I'd like to thank you for making gvm available on windows.

I installed posh-gvm via short script method on Windows 8.1. Then I set my execution policy to unsigned and added the "Import-Module posh-gvm" to my Powershell profile. Now, when I run "gvm install groovy" I get the following error:

"Ausnahme beim Aufrufen von "GetResponse" mit 0 Argument(en): "Die Anfrage wurde abgebrochen: Timeout für Vorgang
überschritten."
In C:\Users\Sascha\Documents\WindowsPowerShell\Modules\posh-gvm\Utils.ps1:338 Zeichen:5

  • $response = $request.GetResponse()
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : WebException"

which translates roughly to:

"Exception while calling "GeResponse" with 0 arguments: "The request was canceled: Timeout reached."
....."

Am I doing something wrong?

should include in documentation that posh-gvm doesn't work offline

when i run import-module posh-gvm it attempts to connect to a url. if offline, break-line causes an exception (the value of the property 'break_line' is null or undefined, not a Function object) then wants me to debug with visual studio.

if i say yes, the offending line indicates a connection to http://api.sdkman.io/app/version is being attempted. this url is not available (proxy servers are annoying).

If i then say "stop debugging", i get a powershell error "This command is not available in offline mode"

so, presumably, posh-gvm isn't available offline (which is annoying), nor does it work properly behind a proxy server (or at least with MY proxy server).... makes the tool less than optimal, shall we say.

the code should more gracefully handle being offline (e.g. should not display "Webpage error; do you want to debug?" dialog box

The term 'gradle' is not recognized as the name of a cmdlet

After first run of powershell system cannot find any installed software for example:

PS C:\Users\username> gradle -v
gradle : The term 'gradle' is not recognized as the name of a cmdlet, function, script file, or operable program. Check

So to make gradle command available we have to run 'gvm c' first.

And there is noway to call gradle from 'cmd'.

posh-gvm uninstall fails due to bug in Remove-Item -Recurse

When trying to uninstall older versions of Gradle, etc. the "gvm uninstall gradle " fails with the following error (user-specific path removed):
Remove-Item : Directory
C:\XXXX.posh_gvm\gradle\1.12\samples\userguide\multiproject\dependencies\java\services\personService\src\main
cannot be removed because it is not empty.
At C:\XXXX\Documents\WindowsPowerShell\Modules\posh-gvm\Commands.ps1:112 char:5

  • Remove-Item -Recurse "$Global:PGVM_DIR\$Candidate\$Version"
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (main:DirectoryInfo) [Remove-Item], IOException
    • FullyQualifiedErrorId : DirectoryNotEmpty,Microsoft.PowerShell.Commands.RemoveItemCommand

This is due to a bug in -Recurse that doesn't process correctly. A workaround has been offered at StackOverflow:
http://stackoverflow.com/questions/1752677/how-to-recursively-delete-an-entire-directory-with-powershell-2-0

How do I change the default path of posh-gvm ?

I found that posh-gvm default set its path as C:\Users\user.posh_gvm.
However, in my case, the space of my C: is not very large. So, can I set the default path of posh-gvm to other path ? such as D:\posh_gvm (in my case).
Thanks a lot.

Import-Module posh-gvm ,This command is not available in offline mode.

Hi
I failed to install posh-gvm with Import-Module ,I got the imformation as follow:

PS C:\Program Files\PowerShell\6.0.2\Modules> Import-Module posh-gvm
Import-Module : This command is not available in offline mode.
At line:1 char:1

  • Import-Module posh-gvm
  • CategoryInfo : OperationStopped: (This command is...n offline mode.:String) [Import-Module], RuntimeException
  • FullyQualifiedErrorId : This command is not available in offline mode.,Microsoft.PowerShell.Commands.ImportModuleCommand

Problems when attempting to use a Proxy

I have found that the current implementation does not support proxies, therefore, I adapted the Utils.ps1 file to support a reasonable amount of pre-configured proxies. Also, I found an issue when using Powershell ISE, which I have circumvented, but needs attention.

User.ps1.txt

gvm install grails results in an exception

Hi,
your posh-gvm module to install grails is not working, tried now on 2 machines both Windows 10
Power shell version 5

same command to install groovy works fine
gvm install groovy works fine

Exception

PS C:\Users\Daniel\Documents\WindowsPowerShell\Modules> gvm install grails

Downloading: grails 3.3.3

Exception calling "GetResponse" with "0" argument(s): "The request was aborted: Could not create SSL/TLS secure
channel."
At C:\Users\Daniel\Documents\WindowsPowerShell\Modules\posh-gvm\Utils.ps1:468 char:5

  • $response = $request.GetResponse()
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : WebException

PS C:\Users\Daniel\Documents\WindowsPowerShell\Modules> $PSVersionTable.PSVersion

Major Minor Build Revision


5 1 16299 251

Install does not execute `use`

I successfully installed posh-gvm and ran the command

gvm install groovy 2.3.1

That proceeded to download and install the corresponding version of Groovy, as you'd expect. When I was then asked whether I want to use that version of Groovy, I simply pressed the return key:

Do you want groovy 2.3.1 to be set as default? (Y/n):

However, groovy could not be found on the path until I executed gvm use. I think there is a missing question here asking whether the user wants to use the newly installed version. I'm actually not sure right now, so I'll check against standard gvm.

Name collision with Hyper-V

After installation of Hyper-V virtual machine (bundled with Visual Studio) gvm command has been overriden and I cannot use gvm command. It would be nice to have alternative command (like sdk in original)

JVM error install posh-gvm

Hi guys, thank you for an awesome tool. I usually work on Linux and SDKMAN install is super easy on Linux.
I'm forced to work on Win 7 now and I was able to install PsGet but I get the following error trying to install posh. Do I need a JDK initially to install posh? I will give it a try anyways and let you guys know what happens.

`PS H:> Update-Module posh-gvm
Module posh-gvm was successfully updated.
Could not find java, please set JAVA_HOME
At \int\userdata\InfraServUser\U203455\WindowsPowerShell\Modules\posh-gvm\Init.ps1:41 char:13

  •         throw "Could not find java, please set JAVA_HOME"
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Could not find ...e set JAVA_HOME:String) [], RuntimeException
    • FullyQualifiedErrorId : Could not find java, please set JAVA_HOME

Import-Module : The specified module '\int\userdata\InfraServUser\U203455\WindowsPowerShell\Modules\posh-gvm' was not
loaded because no valid module file was found in any module directory.
At H:\WindowsPowerShell\Modules\PsGet.psm1:1322 char:9

  •     Import-Module -Name $ModuleBase -Global -Force:$Force
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ResourceUnavailable: (\int\userdata...odules\posh-gvm:String) [Import-Module], FileNot
      FoundException
    • FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand`

Import-Module posh-gvm

I have followed all the steps to set up the posh-gvm. When I get to the Import-Module posh-gvm I get an offline error. I have not found a fix for this and I need to learn groovy so I can create and troubleshoot ScriptRunner scripts. Is there a fix for this or a workaround? My JAVA_HOME is set so that is not the issue. I am stuck.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.