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

[Bug Report]: suggested command for copying openocd-udev-rule should not clobber destination (VSC-888) #698

Closed
ankostis opened this issue Apr 15, 2022 · 1 comment · Fixed by #701
Assignees
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)

Comments

@ankostis
Copy link

After completing a new installation/configuring the extension, a final screen suggests:

All settings have been configured. You can close this window.
For Linux users, OpenOCD needs to add 60-openocd.rules for permission delegation in USB devices to be added in /etc/udev/rules.d/.

Run this command in a terminal with sudo privileges:

sudo cp ${home}/.espressif/tools/openocd-esp32/${esp-version}/openocd-esp32/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d

Expected behavior

A safe choice would be the last command to wanr the user if the file already exists 9and contain possible user modifications),
by using the -n option:

> sudo cp -n ${home}/.espressif/tools/openocd-esp32/${esp-version}/openocd-esp32/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d
  • OS Name: Linux (Debian)
  • VSCode Version: 1.66.1
  • ESP-IDF Version: 1.4.0
@ankostis ankostis added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Apr 15, 2022
@github-actions github-actions bot changed the title [Bug Report]: suggested command for copying openocd-udev-rule should not clobber destination [Bug Report]: suggested command for copying openocd-udev-rule should not clobber destination (VSC-888) Apr 15, 2022
@brianignacio5 brianignacio5 self-assigned this Apr 20, 2022
@mbana
Copy link

mbana commented Mar 8, 2024

This worked for me, I think. Does it work for anybody else?

$ fd .rules .      
./tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/contrib/60-openocd.rules
$ sudo cp -vn ~/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d
'/home/mbana/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/contrib/60-openocd.rules' -> '/etc/udev/rules.d/60-openocd.rules'
$ sudo udevadm control --reload-rules && sudo udevadm trigger

I am on Fedora (39), if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants