You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by dwickern <gi...@git.apache.org> on 2018/01/30 19:49:08 UTC

[GitHub] activemq-artemis pull request #1826: fix ARTEMIS_HOME check in Windows batch...

GitHub user dwickern opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1826

    fix ARTEMIS_HOME check in Windows batch script

    The batch script makes an attempt to detect `ARTEMIS_HOME`:
    ```bat
    PUSHD .
    CD %~dp0..
    set ARTEMIS_HOME="%CD%"
    POPD
    ```
    
    This doesn't work because `%CD%` doesn't update when changing to a new directory. Here's the output from the above code with echo on:
    ```
    C:\Users\dwickern>PUSHD .
    C:\Users\dwickern>CD Z:\activemq\apache-artemis-2.4.0\bin\..
    C:\Users\dwickern>set ARTEMIS_HOME="C:\Users\dwickern"
    C:\Users\dwickern>POPD
    ```
    
    I guess the original code tried to resolve the absolute path but it seems to work fine with relative paths.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dwickern/activemq-artemis fix-windows-home-check

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1826.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1826
    
----
commit 2653a9d898a7946568177337cb4e1cf225cf187f
Author: Derek Wickern <dw...@...>
Date:   2018-01-30T19:34:13Z

    fix ARTEMIS_HOME check in Windows batch script

----


---

[GitHub] activemq-artemis pull request #1826: fix ARTEMIS_HOME check in Windows batch...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1826


---

[GitHub] activemq-artemis issue #1826: fix ARTEMIS_HOME check in Windows batch script

Posted by gaohoward <gi...@git.apache.org>.
Github user gaohoward commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1826
  
    @dwickern ok, I can reproduce it now. I'm going to merge it. Thanks


---

[GitHub] activemq-artemis issue #1826: fix ARTEMIS_HOME check in Windows batch script

Posted by dwickern <gi...@git.apache.org>.
Github user dwickern commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1826
  
    @gaohoward I'm on Windows 7 64-bit as well. You should be able to reproduce by aliasing a drive letter:
    
    ```
    C:\Users\dwickern>c:\apache-artemis-2.4.0\bin\artemis.cmd
    usage: artemis <command> [<args>]
    
    The most commonly used artemis commands are:
        address     Address tools group (create|delete|update|show) (example ./artem
    is address create)
        browser     It will browse messages on an instance
        consumer    It will consume messages from an instance
        create      creates a new broker instance
        data        data tools group (print) (example ./artemis data print)
        help        Display help information
        mask        mask a password and print it out
        migrate1x   Migrates the configuration of a 1.x Artemis Broker
        producer    It will send messages to an instance
        queue       Queue tools group (create|delete|update|stat) (example ./artemis
     queue create)
    
    See 'artemis help <command>' for more information on a specific command.
    
    C:\Users\dwickern>subst w: c:\
    C:\Users\dwickern>w:\apache-artemis-2.4.0\bin\artemis.cmd
    ARTEMIS_HOME environment variable is set incorrectly. Please set ARTEMIS_HOME.
    ```



---

[GitHub] activemq-artemis issue #1826: fix ARTEMIS_HOME check in Windows batch script

Posted by gaohoward <gi...@git.apache.org>.
Github user gaohoward commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1826
  
    @dwickern Hi which version of windows are you run on? I test it on my Windows 7 64-bit and it works. I can't reproduce it. (I don't have other versions of windows like Win10). Also can you test it against the upstream?


---