Skip to content

fix(commands/commit): create tmp file divided by user info#1

Open
SHAQ522 wants to merge 1 commit into
masterfrom
SHAQ522-fix-cz-commit-deny
Open

fix(commands/commit): create tmp file divided by user info#1
SHAQ522 wants to merge 1 commit into
masterfrom
SHAQ522-fix-cz-commit-deny

Conversation

@SHAQ522
Copy link
Copy Markdown
Owner

@SHAQ522 SHAQ522 commented Dec 16, 2020

For multi user siuation, it may get fail

Permission denied: '/tmp/cz.commit.backup'

The reason is another user has already created a temp file with the same name.
So if one user create temp_file should attatch with $USER info to resolve permission issue

Description

attach user info to temp-file name when $USER is possible

Checklist

  • Add test cases to all the changes you introduce
  • Run ./script/format and ./script/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

create /tmp/cz.commit.backup.tom

Steps to Test This Pull Request

Additional context

For multi user siuation, it may get fail `Permission denied: '/tmp/cz.commit/backup` due to another user create a temp file.
So if one user create temp_file should attatch with USER info to resolve permission issue
@SHAQ522 SHAQ522 marked this pull request as ready for review December 16, 2020 09:29
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.

1 participant