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 issue with installing hackatime mac os #893

Merged
merged 5 commits into from
Dec 19, 2024
Merged

Conversation

cshariq
Copy link
Contributor

@cshariq cshariq commented Nov 29, 2024

In many instances VS Code on Mac OS might not add the 'code' command to path(with existing installation and with a reinstallation), this causes the installation of hackatime to be unsuccessful. An easy fix for this is to identify if VS Code is installed, if it is and the 'code' command persists to not work, it gives a more clear error(states that the 'code' command isn't in path). I also acknowledged that many might not have the direct knowledge to add the command to path, thus to make the process more efficient once this issue has been identified it will ask Mac OS users if they'd like to add the 'code' command to path. In my experience, this issue has been common, I've tried installing hackatime with VS Code already installed on multiple devices and encountered the same issue.

Signed-off-by: Shariq Charolia <[email protected]>
Copy link

vercel bot commented Nov 29, 2024

@cshariq is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Nov 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
high-seas ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2024 0:19am

@@ -36,78 +50,24 @@ configure_wakatime() {
echo
}

install_code_command() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't this automatically install code to bin?

Copy link
Contributor Author

@cshariq cshariq Nov 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my experience no, after running the script there was no new file containing the paths(was a new mac, so nth had been setup yet thus there we're no existing paths so creating the code command should have resulted in a new file) and on my other mac which alr had other paths stored, when I went to the zhsprofile file(and its equivalent files that may store paths) I couldn't locate the code command, had to add it manually. I did verify on both laptops that my script works. Maybe you want to integrate it as a backup? Also note that I didn't get any error stating that the code command couldn't be added to path when running the original script.

@cytronicoder
Copy link
Member

Hey! Can you try out this script from #896?

@cshariq
Copy link
Contributor Author

cshariq commented Nov 30, 2024

Hey! Can you try out this script from #896?

That works too yup! Although I do think that for beginner they might not understand the options, buts its fine lol. Both solutions work.

@malted
Copy link
Member

malted commented Dec 6, 2024

@cytronicoder @cshariq I'm kind of confused - which PR do you think should be merged?

@cshariq
Copy link
Contributor Author

cshariq commented Dec 6, 2024

@cytronicoder @cshariq I'm kind of confused - which PR do you think should be merged?

They're basically the same, but i think mine has simpler prompts where, as @cytronicoder has a prompt, beginners might not understand. Tbh, both will work though 😂 .

@malted
Copy link
Member

malted commented Dec 13, 2024

I want to merge this but need more assurance it works - it's really confusing to read. I don't want to break installation; which cases have you tested with? OSs, installation states etc

@cshariq
Copy link
Contributor Author

cshariq commented Dec 13, 2024

I want to merge this but need more assurance it works - it's really confusing to read. I don't want to break installation; which cases have you tested with? OSs, installation states etc

I've tested it on 2 mac os devices with and without vs code and the code command. As far as I've tested I haven't encountered any issues.

public/scripts/hackatime-install.sh Outdated Show resolved Hide resolved
public/scripts/hackatime-install.sh Outdated Show resolved Hide resolved
public/scripts/hackatime-install.sh Outdated Show resolved Hide resolved
@malted
Copy link
Member

malted commented Dec 19, 2024

Thank you sm for your help with this! :)

@malted malted merged commit 974b74c into hackclub:main Dec 19, 2024
1 check failed
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

Successfully merging this pull request may close these issues.

4 participants