Commit 937e8d4
Timabliss
vscode: Use official startup script for version detection & clean registry on update
Refactored the post_install logic to be deterministic and robust:
1. Source of Truth:
Instead of guessing/sniffing directory names (which is error-prone), we now parse the `bin/code` shell script.
This script contains the hardcoded `VERSIONFOLDER` variable, providing the exact path hash used by VS Code itself.
2. Registry Injection:
Dynamically injects the detected path into .reg templates.
3. Update Cleanup:
Detects if older versions exist and automatically runs `uninstall-*.reg` to prevent dead context menu links, ensuring a clean slate for the new version.1 parent 780bc78 commit 937e8d4
1 file changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
40 | | - | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
60 | 78 | | |
61 | 79 | | |
62 | 80 | | |
63 | 81 | | |
64 | 82 | | |
65 | 83 | | |
| 84 | + | |
66 | 85 | | |
67 | 86 | | |
68 | 87 | | |
| |||
0 commit comments