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

VSCode not to associate itself with any file type unless the user chooses so during installation #60796

Closed
CamJN opened this Issue Oct 12, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@CamJN

CamJN commented Oct 12, 2018

  • VSCode Version: 1.28.0
  • OS Version: macOS 10.14 (18A391)

Steps to Reproduce:

  1. Install Visual Studio Code
  2. there is no step 2

Does this issue occur when all extensions are disabled?: Yes

Visual studio is acting maliciously and against the user's wishes by associating itself with filetypes without permission and far beyond any reasonable scope.

Upon installation VSC forcibly associates with all of the following extensions without asking and with no way to prevent this hostility.

  • ascx
  • asp
  • aspx
  • bash
  • bash_login
  • bash_logout
  • bash_profile
  • bashrc
  • bat
  • bowerrc
  • c
  • cc
  • clj
  • cljs
  • cljx
  • clojure
  • cmd
  • code-workspace
  • coffee
  • config
  • cpp
  • cs
  • cshtml
  • csproj
  • css
  • csx
  • ctp
  • cxx
  • dockerfile
  • dot
  • dtd
  • editorconfig
  • edn
  • eyaml
  • eyml
  • fs
  • fsi
  • fsscript
  • fsx
  • gemspec
  • gitattributes
  • gitconfig
  • gitignore
  • go
  • h
  • handlebars
  • hbs
  • hh
  • hpp
  • htm
  • html
  • hxx
  • ini
  • jade
  • jav
  • java
  • js
  • jscsrc
  • jshintrc
  • jshtm
  • json
  • jsp
  • jsx
  • less
  • lua
  • m
  • makefile
  • markdown
  • md
  • mdoc
  • mdown
  • mdtext
  • mdtxt
  • mdwn
  • mjs
  • mkd
  • mkdn
  • ml
  • mli
  • php
  • phtml
  • pl6
  • pl
  • pm6
  • pm
  • pod
  • pp
  • profile
  • properties
  • ps1
  • psd1
  • psgi
  • psm1
  • pug
  • py
  • r
  • rb
  • rhistory
  • rprofile
  • rs
  • rt
  • scss
  • sh
  • shtml
  • sql
  • svg
  • svgz
  • t
  • ts
  • tsx
  • txt
  • vb
  • vue
  • wxi
  • wxl
  • wxs
  • xaml
  • xcodeproj
  • xcworkspace
  • xml
  • yaml
  • yml
  • zlogin
  • zlogout
  • zprofile
  • zsh
  • zshenv
  • zshrc

Currently if you are being forced to keep VSC on your harddrive (for example for work) the only way to keep it from forcing itself on you is to run /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -u /Applications/Visual\ Studio\ Code.app periodically.

@joaomoreno

This comment has been minimized.

Member

joaomoreno commented Oct 15, 2018

Visual studio is acting maliciously and against the user's wishes by associating itself with filetypes without permission and far beyond any reasonable scope.

Actually, VS Code is doing what Apple recommends: setting the CFBundleDocumentTypes key. Nothing else. https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685

If macOS decides to set Code as the default editor for certain file types in your system, then it's a macOS issue. It probably does this if there's no other application able to open those file types.

You can always change the file type association with other applications and macOS will remember your preference.

@joaomoreno joaomoreno closed this Oct 15, 2018

@CamJN

This comment has been minimized.

CamJN commented Oct 15, 2018

One by one for 129 different file types? Are you serious? If you're going to ask to be the default editor for so many filetypes put it behind a dialog that requests permission to do so. Just because Apple provides a mechanism to do this doesn't make it ok. They also provide a mechanism to delete all the files in my home directory, and I'd expect you to not do that either.

@joaomoreno

This comment has been minimized.

Member

joaomoreno commented Oct 15, 2018

Apple doesn't provide a mechanism to become the default application for file types. It provides a mechanism to register as an able application for file types, which is what VS Code does. It's macOS that takes that ability and sets the application as the default one, if that app is the only one in your system which is able to open those file types.

@CamJN

This comment has been minimized.

CamJN commented Oct 16, 2018

Well now that's just not true, you can at the very least use the tool I mentioned before (lsregister) to programmatically set default applications. The zero-touch method only really makes sense for proprietary file types.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.