Skip to content

Commit

Permalink
Released 7.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsutton committed May 23, 2024
1 parent 6cd27cc commit ad1b071
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 156 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 7.0.0
- upgraded to dcli 4.x and dart 3.2 to fix the waitFor issue.

# 6.0.0-alpha.2
- removed the logic that force an install of the stable version of dart
given we must already be running a dart version we don't need to install
Expand Down
42 changes: 20 additions & 22 deletions bin/dswitch_install.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import 'dart:io' as io;
import 'package:args/args.dart';
import 'package:dcli/dcli.dart';
import 'package:dswitch/dswitch.dart';
import 'package:dswitch/src/channel.dart';
import 'package:dswitch/src/commands/commands.dart';
import 'package:dswitch/src/constants.dart';
import 'package:dswitch/src/exceptions/exit.dart';
import 'package:dswitch/src/settings.dart';
import 'package:path/path.dart';
Expand Down Expand Up @@ -51,7 +49,7 @@ Future<void> run(List<String> args, ArgParser argParser) async {
Settings().setVerbose(enabled: parsed['verbose'] as bool);

if (!parsed.wasParsed('stage2')) {
runStage1();
await runStage1();
} else {
final pathToDSwitch = parsed['stage2'] as String;
final pathToHome = parsed['home'] as String;
Expand All @@ -63,7 +61,7 @@ Future<void> run(List<String> args, ArgParser argParser) async {
print(orange('dswitch is ready to run'));
}

void runStage1() {
Future<void> runStage1() async {
if (!Shell.current.isPrivilegedUser) {
if (io.Platform.isWindows) {
throw ExitException(
Expand Down Expand Up @@ -209,21 +207,21 @@ String get pathToInstallDir {
return target;
}

Future<void> installDart() async {
Channel? active;

/// Check we have an installed and active version of dart.
for (final channel in channels) {
final ch = Channel(channel);
if (ch.isActive) {
active = ch;
}
}

/// if we don't have an active version then install and make it active.
if (active == null) {
final channel = Channel('stable');
await channel.installLatestVersion();
channel.use();
}
}
// Future<void> installDart() async {
// Channel? active;

// /// Check we have an installed and active version of dart.
// for (final channel in channels) {
// final ch = Channel(channel);
// if (ch.isActive) {
// active = ch;
// }
// }

// /// if we don't have an active version then install and make it active.
// if (active == null) {
// final channel = Channel('stable');
// await channel.installLatestVersion();
// channel.use();
// }
// }
2 changes: 1 addition & 1 deletion lib/src/version/version.g.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/// GENERATED BY pub_release do not modify.
/// Instance of 'Name' version
String packageVersion = '6.0.0';
String packageVersion = '7.0.0';
Loading

0 comments on commit ad1b071

Please sign in to comment.