Skip to content

Commit 68e932b

Browse files
authored
Merge pull request LuchoBazz#106 from LuisMBaezCo/develop
feat: added support for mac os in generate snippets process
2 parents 1a133aa + 9e19058 commit 68e932b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

generate_vscode_snippets.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@
44
import platform
55

66
HOME = os.path.expanduser("~")
7-
PATH = HOME + '/.config/Code/User/snippets/cpp.json'
87

9-
if platform.system() in ['Windows', 'Win32']:
10-
# for windows
8+
OS = platform.system()
9+
10+
if OS in ['Windows', 'Win32']: # for windows
1111
PATH = HOME + '/AppData/Roaming/Code/User/snippets/cpp.json'
12+
elif OS == 'Linux': # for linux
13+
PATH = HOME + '/.config/Code/User/snippets/cpp.json'
14+
elif OS == 'Darwin': # for mac os
15+
PATH = HOME + '/Library/Application Support/Code/User/snippets/cpp.json'
16+
else:
17+
print(OS)
18+
sys.exit('unsupported operating system')
1219

1320
def add_snippets_to_vscode(root_path, filename, ext):
1421
path = root_path + filename + '.' + ext

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy