onepub-dev / onepub-dev/dswitch

dswitch case error Failed to decode data using encoding 'utf-8', path = '/home/bsutton/.pub-cache/bin/dswitch'

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
8
Forks
1
PR merge metrics
No merged PRs in 30d

Description

After we compile dswitch if you run a pub global activate on any project you get the error:

Failed to decode data using encoding 'utf-8', path = '/home/bsutton/.pub-cache/bin/dswitch'

This is because pub expects dswitch to be a text file (script).

We may need to use a .sh script to launch the exe to get around this problem.

The problem with that approach is that current if you upgrade dswitch pub global replaces our compiled script which dswitch notices and tells the user to upgrade.
By changing to a .sh we will have to do something to check we are running the correct version when ever we launch.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure after compiling dswitch and running pub global activate on a project. Investigate how the installed executable is launched and how its version is checked; done means global activation no longer fails and upgrades still detect whether the installed dswitch version is current.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.