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

-path flag does not appear in usage #273

Closed
lacasseio opened this issue Aug 27, 2022 · 4 comments
Closed

-path flag does not appear in usage #273

lacasseio opened this issue Aug 27, 2022 · 4 comments

Comments

@lacasseio
Copy link

lacasseio commented Aug 27, 2022

The -path flag usage was removed from the RC file in this commit. This flag seems to be exactly what we need, but I saw it disappear from the help:

Version 2.7.1

Visual Studio Locator version 2.7.1+180c706d56 [query version 2.7.3111.17308]
Copyright (C) Microsoft Corporation. All rights reserved.

Usage:  [options]

Selection options:
  -all           Finds all instances even if they are incomplete and may not launch.
  -prerelease    Also searches prereleases. By default, only releases are searched.
  -products arg  One or more product IDs to find. Defaults to Community, Professional, and Enterprise.
                 Specify "*" by itself to search all product instances installed.
                 See https://aka.ms/vs/workloads for a list of product IDs.
  -requires arg  One or more workload or component IDs required when finding instances.
                 All specified IDs must be installed unless -requiresAny is specified.
                 See https://aka.ms/vs/workloads for a list of workload and component IDs.
  -requiresAny   Find instances with any one or more workload or components IDs passed to -requires.
  -version arg   A version range for instances to find. Example: [15.0,16.0) will find versions 15.*.
  -latest        Return only the newest version and last installed.
  -legacy        Also searches Visual Studio 2015 and older products. Information is limited.
                 This option cannot be used with either -products or -requires.
  -path arg      Gets the instance for the current path. Not compatible with any other selection option.
[...]

Version 3.0.3

Visual Studio Locator version 3.0.3+45247720e1 [query version 2.7.3111.17308]
Copyright (C) Microsoft Corporation. All rights reserved.

Usage:  [options]

Options:
  -all           Finds instances in complete, launchable, and incomplete states. By default, only instances
                 in a complete state - no errors or reboot required - are searched.
  -prerelease    Also searches prereleases. By default, only releases are searched.
  -products arg  One or more product IDs to find. Defaults to Community, Professional, and Enterprise.
                 Specify "*" by itself to search all product instances installed.
                 See https://aka.ms/vs/workloads for a list of product IDs.
  -requires arg  One or more workload or component IDs required when finding instances.
                 All specified IDs must be installed unless -requiresAny is specified.
                 See https://aka.ms/vs/workloads for a list of workload and component IDs.
  -requiresAny   Find instances with any one or more workload or components IDs passed to -requires.
  -version arg   A version range for instances to find. Example: [15.0,16.0) will find versions 15.*.
  -latest        Return only the newest version and last installed.
  -sort          Sorts the instances from newest version and last installed to oldest.
                 When used with "find", first instances are sorted then files are sorted lexigraphically.
  -legacy        Also searches Visual Studio 2015 and older products. Information is limited.
                 This option cannot be used with either -products or -requires.
  -format arg    Return information about instances found in a format described below.
  -property arg  The name of a property to return. Defaults to "value" format.
                 Use delimiters ".", "/", or "_" to separate object and property names.
                 Example: "properties.nickname" will return the "nickname" property under "properties".
  -include arg   One or more extra properties to include, as described below.
  -find arg      Returns matching file paths under the installation path. Defaults to "value" format.
                 The following patterns are supported:
                 ?  Matches any one character except "\".
                 *  Matches zero or more characters except "\".
                 ** Searches the current directory and subdirectories for the remaining search pattern.
  -nocolor       Do not print instances formatted with colors. By default, colors suitable for dark-themed
                 terminals (common) are output when printing to a terminal but not to a pipe.
  -nologo        Do not show logo information. Some formats noted below will not show a logo anyway.
  -utf8          Use UTF-8 encoding (recommended for JSON).
  -?, -h, -help  Display this help message.
[...]

I'm pretty sure it's just a bad merge or something similar because I couldn't find anything that would indicate the flag is being phased out.

@heaths
Copy link
Member

heaths commented Aug 29, 2022

Thanks for catching that. Yes, it's likely a bad merge since the .rc file gets treated as a binary file. I've tried a few ways to fix it, but either Git or VS doesn't like it when I do.

But, yes, -path is definitely supported and we'll be sure to get that added back, along with any others that might be accidentally missing.

This is a quick fix, but I want to talk with the VC folks and see what they recommend to help mitigate this issue going forward.

@lacasseio
Copy link
Author

That's what I thought. I encountered the same issue when I was comparing the commits. Kind of disappointing that the .rc files are treated as binary files.

@heaths
Copy link
Member

heaths commented Sep 1, 2022

I followed up with the VC team and as of 16.3, UTF-8 .rc files should work fine now. I'll convert the file and make sure everything is working end to end in the course of fixing this.

heaths added a commit to heaths/vswhere that referenced this issue Nov 14, 2022
Upgrades the project to work with supported versions, and prepares pipelines to work with a GitHub flow i.e., only main (will rename from master). Also fixes microsoft#273
heaths added a commit that referenced this issue Nov 14, 2022
* Upgrade project, prepare GitHub flow

Upgrades the project to work with supported versions, and prepares pipelines to work with a GitHub flow i.e., only main (will rename from master). Also fixes #273

* Microsoft mandatory file (#274)

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>

* Update .vsconfig

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
@heaths
Copy link
Member

heaths commented Nov 15, 2022

This was resolved in #279. We'll release a new version soon.

@heaths heaths closed this as completed Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants