Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): check if dotfiles install script is executable#8588

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 15 commits intocoder:mainfromBRAVO68WEB:feat/dotfiles-exec
Jul 21, 2023

Conversation

BRAVO68WEB
Copy link
Contributor

Problem Statement

So I was having an issue regarding the installation of dotfiles. Everything was working fine until an install script was executed. This install script was installing system dependencies and using sudo commands. Hence, I was gettingpermission denied.

image

Solution

I added a code snippet just before the scripts were executed.

image

PS: Sorry, I didn't create an Issue first.

@github-actions
Copy link

github-actionsbot commentedJul 19, 2023
edited
Loading

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@cdr-botcdr-botbot added the communityPull Requests and issues created by the community. labelJul 19, 2023
@BRAVO68WEB
Copy link
ContributorAuthor

I have read the CLA Document and I hereby sign the CLA

cdrcommunity added a commit to coder/cla that referenced this pull requestJul 19, 2023
@mafredri
Copy link
Member

Thanks for the contribution! I do wonder whether or not we should do this, though. This will introduce a local change into the repo being checked out (git tracks executable bit on files). Another solution would be tochmod +x bootstrap.sh && git add bootstrap.sh && git commit in your personal repo.

Perhaps it would be safer to check the executable bit and print a pretty error explaining how to fix it? We could also run scripts via interpreter like/bin/sh, etc, but this would also require checking potential shebang (#!/bin/other) at the top of the script. And doing that might also not work properly on Windows.

@BRAVO68WEB
Copy link
ContributorAuthor

Hmm.. Let me look into it

@BRAVO68WEB
Copy link
ContributorAuthor

BRAVO68WEB commentedJul 19, 2023
edited
Loading

This will introduce a local change into the repo being checked out (git tracks executable bit on files). Another solution would be tochmod +x bootstrap.sh && git add bootstrap.sh && git commit in your personal repo.

Yes, you are correct in that case.

So, I found this onStackOverflow.

Shall I set a git config, so that such changes are ignored, for the dotfiles cloned repo?

Perhaps it would be safer to check the executable bit and print a pretty error explaining how to fix it?

Yes, can be done too.

I am unable to choose which would be a better solution.

@BRAVO68WEB
Copy link
ContributorAuthor

BRAVO68WEB commentedJul 19, 2023
edited
Loading

Yeah on second thoughts, 2nd solution would be better. Check for exec bits, and notify user about the same. I am changing this, and pushing

@BRAVO68WEB
Copy link
ContributorAuthor

@mafredri Can you review it!

image

@BRAVO68WEBBRAVO68WEB changed the titlefeat: made dotfiles install scripts executablefeat: make dotfiles install scripts executableJul 19, 2023
@BRAVO68WEBBRAVO68WEB changed the titlefeat: make dotfiles install scripts executablefeat: check if dotfiles install script is executableJul 19, 2023
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
@BRAVO68WEB
Copy link
ContributorAuthor

I will also try to update docs.

@BRAVO68WEB
Copy link
ContributorAuthor

@mafredri I have added to docs about the same

Co-authored-by: Muhammad Atif Ali <matifali@live.com>
@BRAVO68WEB
Copy link
ContributorAuthor

Added all suggested changes.

Co-authored-by: Muhammad Atif Ali <matifali@live.com>
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

I may have had some grammar nits, but all in all, excellent work! Thanks a lot for your contribution and going the extra mile!☺️

BRAVO68WEB reacted with laugh emoji
BRAVO68WEBand others added6 commitsJuly 21, 2023 17:46
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
@mafredrimafredri changed the titlefeat: check if dotfiles install script is executablefeat(cli): check if dotfiles install script is executableJul 21, 2023
@mafredrimafredrienabled auto-merge (squash)July 21, 2023 12:27
@mafredrimafredri merged commit65583ec intocoder:mainJul 21, 2023
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 21, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@matifalimatifalimatifali approved these changes

Assignees

@BRAVO68WEBBRAVO68WEB

Labels
communityPull Requests and issues created by the community.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@BRAVO68WEB@mafredri@matifali

[8]ページ先頭

©2009-2025 Movatter.jp