Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !2051

Fix global use of `@echo off` within chocolatey BAT file

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/rivy/fix.choco-bat into master Oct 06, 2018
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: rivy

Discussion

@echo off is a global setting, changing the caller's state, and shouldn't be used without a preceding setlocal. Alternatively, if you want to pass environmental state back up to the caller, both setlocal and echo off can be removed, and commands in the BAT/CMD file prefixed with an "@" to suppress display, eg:

@REM Invoke buck.pex in the same directory as this script with python
@REM We try to find a python2 installation first because python3 can
@REM install itself as 'python.exe' on the path, and we don't want that
@REM just yet
@if exist "C:\Python27\python.exe" @(
  C:\Python27\python.exe %~dp0\buck.pex %*
) else @(
  python %~dp0\buck.pex %*
)

But I don't see that you need that, so this would be the simpler fix.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/rivy/fix.choco-bat