Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incrementing of variables in cpuUsage.sh #77512

Merged
merged 1 commit into from Jul 17, 2019

Conversation

@letmaik
Copy link
Member

commented Jul 17, 2019

((x++)) will fail if x is 0, as ((..)) fails if the result is 0.
Using ((++x)) avoids this case.

Reference: https://askubuntu.com/questions/385528/how-to-increment-a-variable-in-bash#comment573516_385532

Without the fix the Process Explorer wouldn't show any numbers for the remote host when using ssh remote.

fix incrementing of variables in bash script
((x++)) will fail if x is 0, as ((..)) fails if the result is 0.
Using ((++x)) avoids this case.
@RMacfarlane
Copy link
Contributor

left a comment

Thanks @letmaik!

@RMacfarlane RMacfarlane merged commit b11b93e into microsoft:master Jul 17, 2019

5 checks passed

VS Code Build #20190717.4 succeeded
Details
VS Code (Linux) Linux succeeded
Details
VS Code (Windows) Windows succeeded
Details
VS Code (macOS) macOS succeeded
Details
license/cla All CLA requirements met.

@RMacfarlane RMacfarlane added this to the July 2019 milestone Jul 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.