Change directory

How can I change current directory?
Example:

echo %CD%
C:\projects\appveyor-test
cd _builds
echo %CD%
C:\projects\appveyor-test
  1. Try selecting "PS" when configuring script. The main build session is PowerShell session, but "CMD" scripts run as a separate batches that do not affect "parent" session.

  2. Now I can't find my build logs (: I only see error message 'Specify a project or solution file. The directory does not contain a project or solution file' but I have both 'build_script' and 'test_script' as custom steps.

  3. Are you configuring project through appveyor.yml? Can you post it?

  4. Sure:

    build_script:
      - echo %CD%
      - mkdir foo
      - echo %CD%
      - ps: cd foo
      - echo %CD%
      - cmake -H. -B_builds
      - cmake --build _builds
    
    test_script:
      - echo %CD%
      - ps: cd _builds
      - echo %CD%
      - ctest -VV
      - echo %CD%
    

    BTW the whole project:
    https://github.com/forexample/appveyor-test

  5. Thanks, I will take a look. Could you please post Appveyor project URL?

  6. Hm, I thought it's AppVeyor 2.0 beta. appveyor.yml is supported in beta only: blog.appveyor.com/2014/02/19/appveyor-20-dedicated-build-vms-parallel-testing-nuget-deployment/

    Could you please try running your project on beta?

  7. Hah (: Didn't notice that, sorry.

    'cd' with 'ps' works fine. Thank you!

  8. Cool! Let me know if you find anything else.

  9. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:38 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions